don't prematurly mark conversation as read during activity start. fixes #2245
This commit is contained in:
parent
1dcf804618
commit
143ad48be1
|
@ -99,6 +99,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
|
|
||||||
private String mOpenConversation = null;
|
private String mOpenConversation = null;
|
||||||
private boolean mPanelOpen = true;
|
private boolean mPanelOpen = true;
|
||||||
|
private AtomicBoolean mShouldPanelBeOpen = new AtomicBoolean(false);
|
||||||
private Pair<Integer,Integer> mScrollPosition = null;
|
private Pair<Integer,Integer> mScrollPosition = null;
|
||||||
final private List<Uri> mPendingImageUris = new ArrayList<>();
|
final private List<Uri> mPendingImageUris = new ArrayList<>();
|
||||||
final private List<Uri> mPendingFileUris = new ArrayList<>();
|
final private List<Uri> mPendingFileUris = new ArrayList<>();
|
||||||
|
@ -134,6 +135,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
public void showConversationsOverview() {
|
public void showConversationsOverview() {
|
||||||
if (mContentView instanceof SlidingPaneLayout) {
|
if (mContentView instanceof SlidingPaneLayout) {
|
||||||
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
|
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
|
||||||
|
mShouldPanelBeOpen.set(true);
|
||||||
mSlidingPaneLayout.openPane();
|
mSlidingPaneLayout.openPane();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,6 +153,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
public void hideConversationsOverview() {
|
public void hideConversationsOverview() {
|
||||||
if (mContentView instanceof SlidingPaneLayout) {
|
if (mContentView instanceof SlidingPaneLayout) {
|
||||||
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
|
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
|
||||||
|
mShouldPanelBeOpen.set(false);
|
||||||
mSlidingPaneLayout.closePane();
|
mSlidingPaneLayout.closePane();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,8 +164,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
|
|
||||||
public boolean isConversationsOverviewVisable() {
|
public boolean isConversationsOverviewVisable() {
|
||||||
if (mContentView instanceof SlidingPaneLayout) {
|
if (mContentView instanceof SlidingPaneLayout) {
|
||||||
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
|
return mShouldPanelBeOpen.get();
|
||||||
return mSlidingPaneLayout.isOpen();
|
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1129,6 +1131,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
|
|
||||||
|
|
||||||
if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) {
|
if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) {
|
||||||
|
Conversation c = getSelectedConversation();
|
||||||
sendReadMarkerIfNecessary(getSelectedConversation());
|
sendReadMarkerIfNecessary(getSelectedConversation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue