diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-11 00:32:38 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-11 00:32:38 +0100 |
commit | fcb69d77c8a85d7953e765d8c5b47cd71a245d7a (patch) | |
tree | fde900176b64ce4afe5f304ed5d06bd1e23f4931 /src/main/java | |
parent | 0c3b18e258f2b42619fb388520094ae63b8ca6ff (diff) |
fix UI recreation after changing notification settings
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index a6e2a40de..15e78d262 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -111,7 +111,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers getString(R.string.notify_never) }; final AtomicInteger choice; - if (mConversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL, 0) <= Long.MAX_VALUE) { + if (mConversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL, 0) == Long.MAX_VALUE) { choice = new AtomicInteger(2); } else { choice = new AtomicInteger(mConversation.alwaysNotify() ? 0 : 1); @@ -142,6 +142,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers till = System.currentTimeMillis() + (durations[which] * 1000); } mConversation.setMutedTill(till); + xmppConnectionService.updateConversation(mConversation); + updateView(); } }); builder.create().show(); diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index adebdc3ad..cdc1ba336 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -176,10 +176,10 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp getString(R.string.notify_never) }; final AtomicInteger choice; - if (mConversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL, 0) <= Long.MAX_VALUE) { - choice = new AtomicInteger(1); - } else { + if (mConversation.alwaysNotify()) { choice = new AtomicInteger(0); + } else { + choice = new AtomicInteger(1); } builder.setSingleChoiceItems(choices, choice.get(), new DialogInterface.OnClickListener() { @Override @@ -207,6 +207,8 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp till = System.currentTimeMillis() + (durations[which] * 1000); } mConversation.setMutedTill(till); + xmppConnectionService.updateConversation(mConversation); + populateView(); } }); builder.create().show(); |