Refactoring

This commit is contained in:
M66B
2023-12-13 07:21:15 +01:00
parent 9f1bab8e19
commit 9569b0e28e
14 changed files with 25 additions and 28 deletions

View File

@@ -3562,7 +3562,7 @@ public class FragmentCompose extends FragmentBase {
});
snackbar.show();
} else {
File dir = Helper.ensureExists(context.getFilesDir(), "photo");
File dir = Helper.ensureExists(context, "photo");
File file = new File(dir, working + "_" + new Date().getTime() + ".jpg");
try {
photoURI = FileProviderEx.getUri(context, BuildConfig.APPLICATION_ID, file);
@@ -3874,7 +3874,7 @@ public class FragmentCompose extends FragmentBase {
throw new IllegalArgumentException(context.getString(R.string.title_from_missing));
// Create files
File tmp = Helper.ensureExists(context.getFilesDir(), "encryption");
File tmp = Helper.ensureExists(context, "encryption");
File input = new File(tmp, draft.id + "_" + session + ".pgp_input");
File output = new File(tmp, draft.id + "_" + session + ".pgp_output");
@@ -4242,7 +4242,7 @@ public class FragmentCompose extends FragmentBase {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean check_certificate = prefs.getBoolean("check_certificate", true);
File tmp = Helper.ensureExists(context.getFilesDir(), "encryption");
File tmp = Helper.ensureExists(context, "encryption");
DB db = DB.getInstance(context);