diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2017-01-20 10:43:50 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2017-01-20 10:43:50 +0100 |
commit | 143ad48be1970f1d71445c7698d9011c64ce1b3f (patch) | |
tree | e209786e6b978fd7041e21aec9774a41b4a8474e | |
parent | 1dcf8046181a2b6559e81b3704ba9aa760be8ce0 (diff) |
don't prematurly mark conversation as read during activity start. fixes #2245
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 871fa604..9b6f1dbd 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -99,6 +99,7 @@ public class ConversationActivity extends XmppActivity private String mOpenConversation = null; private boolean mPanelOpen = true; + private AtomicBoolean mShouldPanelBeOpen = new AtomicBoolean(false); private Pair<Integer,Integer> mScrollPosition = null; final private List<Uri> mPendingImageUris = new ArrayList<>(); final private List<Uri> mPendingFileUris = new ArrayList<>(); @@ -134,6 +135,7 @@ public class ConversationActivity extends XmppActivity public void showConversationsOverview() { if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; + mShouldPanelBeOpen.set(true); mSlidingPaneLayout.openPane(); } } @@ -151,6 +153,7 @@ public class ConversationActivity extends XmppActivity public void hideConversationsOverview() { if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; + mShouldPanelBeOpen.set(false); mSlidingPaneLayout.closePane(); } } @@ -161,8 +164,7 @@ public class ConversationActivity extends XmppActivity public boolean isConversationsOverviewVisable() { if (mContentView instanceof SlidingPaneLayout) { - SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; - return mSlidingPaneLayout.isOpen(); + return mShouldPanelBeOpen.get(); } else { return true; } @@ -1129,6 +1131,7 @@ public class ConversationActivity extends XmppActivity if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) { + Conversation c = getSelectedConversation(); sendReadMarkerIfNecessary(getSelectedConversation()); } |