diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 8713263425cd019dd3b6f6b3f2df1e2f65f29e21..61c76eb6e9fbf5387ea0d0a92b87f25d80b96f84 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -1045,11 +1045,7 @@ public class EditAccountActivity extends OmemoActivity } private void deleteAccount() { - this.deleteAccount( - mAccount, - () -> { - finish(); - }); + this.deleteAccount(mAccount, () -> finish()); } private boolean inNeedOfSaslAccept() { @@ -1393,7 +1389,7 @@ public class EditAccountActivity extends OmemoActivity if (hasKeys && Config.supportOmemo()) { // TODO: either the button should be visible if we // print an active device or the device list should - // be fed with reactived devices + // be fed with reactivated devices this.binding.otherDeviceKeysCard.setVisibility(View.VISIBLE); Set otherDevices = mAccount.getAxolotlService().getOwnDeviceIds(); if (otherDevices == null || otherDevices.isEmpty()) { @@ -1409,12 +1405,17 @@ public class EditAccountActivity extends OmemoActivity } } else { final TextInputLayout errorLayout; - if (this.mAccount.errorStatus()) { - if (this.mAccount.getStatus() == Account.State.UNAUTHORIZED - || this.mAccount.getStatus() == Account.State.DOWNGRADE_ATTACK) { + final var status = this.mAccount.getStatus(); + if (status.isError() + || Arrays.asList( + Account.State.NO_INTERNET, + Account.State.MISSING_INTERNET_PERMISSION) + .contains(status)) { + if (status == Account.State.UNAUTHORIZED + || status == Account.State.DOWNGRADE_ATTACK) { errorLayout = this.binding.accountPasswordLayout; } else if (mShowOptions - && this.mAccount.getStatus() == Account.State.SERVER_NOT_FOUND + && status == Account.State.SERVER_NOT_FOUND && this.binding.hostname.getText().length() > 0) { errorLayout = this.binding.hostnameLayout; } else {