aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 5e2199206..6275e3016 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -140,6 +140,7 @@ public class ConversationActivity extends XmppActivity
private boolean mActivityPaused = false;
private AtomicBoolean mRedirected = new AtomicBoolean(false);
private Pair<Integer, Intent> mPostponedActivityResult;
+ private boolean mUnprocessedNewIntent = false;
long FirstStartTime = -1;
@@ -548,7 +549,7 @@ public class ConversationActivity extends XmppActivity
}
public void sendReadMarkerIfNecessary(final Conversation conversation) {
- if (!mActivityPaused && conversation != null) {
+ if (!mActivityPaused && !mUnprocessedNewIntent && conversation != null) {
xmppConnectionService.sendReadMarker(conversation);
}
}
@@ -1294,6 +1295,7 @@ public class ConversationActivity extends XmppActivity
protected void onNewIntent(final Intent intent) {
if (intent != null && ACTION_VIEW_CONVERSATION.equals(intent.getAction())) {
mOpenConversation = null;
+ mUnprocessedNewIntent = true;
if (xmppConnectionServiceBound) {
handleViewConversationIntent(intent);
intent.setAction(Intent.ACTION_MAIN);
@@ -1551,6 +1553,7 @@ public class ConversationActivity extends XmppActivity
this.mConversationFragment.appendText(text);
}
hideConversationsOverview();
+ mUnprocessedNewIntent = false;
openConversation();
if (mContentView instanceof SlidingPaneLayout) {
updateActionBarTitle(true); //fixes bug where slp isn't properly closed yet
@@ -1560,7 +1563,9 @@ public class ConversationActivity extends XmppActivity
if (message != null) {
startDownloadable(message);
}
- }
+ } else {
+ mUnprocessedNewIntent = false;
+ }
}
}