diff options
Diffstat (limited to 'src/main')
-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(); |