From 36c9a452ab3ce273de76ca482ff375ebd8fc046a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 24 Oct 2018 13:54:57 +0200 Subject: [PATCH] always prevent edit in quicksy mode --- .../conversations/services/QuickConversationsService.java | 6 ++++-- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 3 ++- .../conversations/services/QuickConversationsService.java | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/full/java/eu/siacs/conversations/services/QuickConversationsService.java b/src/full/java/eu/siacs/conversations/services/QuickConversationsService.java index 896c07c53..aacf9f23b 100644 --- a/src/full/java/eu/siacs/conversations/services/QuickConversationsService.java +++ b/src/full/java/eu/siacs/conversations/services/QuickConversationsService.java @@ -1,7 +1,5 @@ package eu.siacs.conversations.services; -import eu.siacs.conversations.services.XmppConnectionService; - public class QuickConversationsService { private final XmppConnectionService service; @@ -9,4 +7,8 @@ public class QuickConversationsService { QuickConversationsService(XmppConnectionService xmppConnectionService) { this.service = xmppConnectionService; } + + public static boolean isQuicksy() { + return false; + } } \ No newline at end of file diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 85342fad8..76d835757 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -58,6 +58,7 @@ import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Presence; import eu.siacs.conversations.entities.PresenceTemplate; import eu.siacs.conversations.services.BarcodeProvider; +import eu.siacs.conversations.services.QuickConversationsService; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate; import eu.siacs.conversations.services.XmppConnectionService.OnCaptchaRequested; @@ -940,7 +941,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat } - final boolean editable = !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY); + final boolean editable = !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY) && !QuickConversationsService.isQuicksy(); this.binding.accountJid.setEnabled(editable); this.binding.accountJid.setFocusable(editable); this.binding.accountJid.setFocusableInTouchMode(editable); diff --git a/src/quick/java/eu/siacs/conversations/services/QuickConversationsService.java b/src/quick/java/eu/siacs/conversations/services/QuickConversationsService.java index 8ffee4ff4..ed6259173 100644 --- a/src/quick/java/eu/siacs/conversations/services/QuickConversationsService.java +++ b/src/quick/java/eu/siacs/conversations/services/QuickConversationsService.java @@ -256,6 +256,10 @@ public class QuickConversationsService { return mVerificationRequestInProgress.get(); } + public static boolean isQuicksy() { + return true; + } + public interface OnVerificationRequested { void onVerificationRequestFailed(int code);