Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-07-01 16:34:38 +02:00
parent b20cb89ebd
commit cdc2c26adf
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
2 changed files with 27 additions and 7 deletions

View file

@ -88,6 +88,30 @@ public class StorageMigration {
return f.exists() && f.isDirectory(); return f.exists() && f.isDirectory();
} }
public static void a(ViewThemeUtils viewThemeUtils, Context context) {
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context)
.setMessage(R.string.file_migration_directory_already_exists)
.setCancelable(true)
.setOnCancelListener(dialogInterface -> {
})
.setNegativeButton(R.string.common_cancel, (dialogInterface, i) -> {
})
.setNeutralButton(R.string.file_migration_use_data_folder, (dialogInterface, i) -> {
})
.setPositiveButton(R.string.file_migration_override_data_folder, (dialogInterface, i) -> {
});
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(context, builder);
AlertDialog alertDialog = builder.create();
alertDialog.show();
}
private void askToOverride() { private void askToOverride() {
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(mContext) final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(mContext)
.setMessage(R.string.file_migration_directory_already_exists) .setMessage(R.string.file_migration_directory_already_exists)
@ -133,8 +157,7 @@ public class StorageMigration {
}); });
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(mContext, builder); viewThemeUtils.dialog.colorMaterialAlertDialogBackground(mContext, builder);
builder.create(); builder.create().show();
builder.show();
} }
private ProgressDialog createMigrationProgressDialog() { private ProgressDialog createMigrationProgressDialog() {
@ -232,8 +255,7 @@ public class StorageMigration {
}); });
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(mContext, builder); viewThemeUtils.dialog.colorMaterialAlertDialogBackground(mContext, builder);
builder.create(); builder.create().show();
builder.show();
} }
protected boolean[] saveAccountsSyncStatus() { protected boolean[] saveAccountsSyncStatus() {

View file

@ -230,9 +230,7 @@ class SyncedFoldersActivity :
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(this, builder) viewThemeUtils.dialog.colorMaterialAlertDialogBackground(this, builder)
val alertDialog = builder.create() builder.create().show()
builder.show()
viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE))
} }
/** /**