Use brandingUtil

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-07-22 15:37:42 +02:00 committed by Tobias Kaminsky
parent 2298f8cda2
commit 4738872f77

View file

@ -28,6 +28,7 @@ import java.util.concurrent.Executors;
import java.util.function.Function; import java.util.function.Function;
import it.niedermann.owncloud.notes.LockedActivity; import it.niedermann.owncloud.notes.LockedActivity;
import it.niedermann.owncloud.notes.NotesApplication;
import it.niedermann.owncloud.notes.R; import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.branding.BrandingUtil; import it.niedermann.owncloud.notes.branding.BrandingUtil;
import it.niedermann.owncloud.notes.branding.DeleteAlertDialogBuilder; import it.niedermann.owncloud.notes.branding.DeleteAlertDialogBuilder;
@ -146,7 +147,7 @@ public class ManageAccountsActivity extends LockedActivity implements IManageAcc
binding.inputWrapper.setHint(title); binding.inputWrapper.setHint(title);
final var dialog = new MaterialAlertDialogBuilder(this) MaterialAlertDialogBuilder alertDialogBuilder = new MaterialAlertDialogBuilder(this)
.setTitle(title) .setTitle(title)
.setMessage(message) .setMessage(message)
.setView(binding.getRoot()) .setView(binding.getRoot())
@ -176,8 +177,13 @@ public class ManageAccountsActivity extends LockedActivity implements IManageAcc
ExceptionDialogFragment.newInstance(e).show(getSupportFragmentManager(), ExceptionDialogFragment.class.getSimpleName()); ExceptionDialogFragment.newInstance(e).show(getSupportFragmentManager(), ExceptionDialogFragment.class.getSimpleName());
} }
}); });
}) });
.show();
NotesApplication.brandingUtil().dialog.colorMaterialAlertDialogBackground(this, alertDialogBuilder);
var dialog = alertDialogBuilder.create();
alertDialogBuilder.show();
try { try {
repository.getServerSettings(AccountImporter.getSingleSignOnAccount(this, localAccount.getAccountName()), getPreferredApiVersion(localAccount.getApiVersion())) repository.getServerSettings(AccountImporter.getSingleSignOnAccount(this, localAccount.getAccountName()), getPreferredApiVersion(localAccount.getApiVersion()))
.enqueue(new Callback<>() { .enqueue(new Callback<>() {