From 95d5e508c471efe274f83ef5b3c2040e8021d5f6 Mon Sep 17 00:00:00 2001 From: Peter Chu Date: Tue, 18 Aug 2015 21:23:20 -0400 Subject: [PATCH] Mark message as read in the MessageListFragment when it is attached, rather than when it started. Fixes the ToolBar title bug where when the app returns to the foreground, the title is set to the title from the MessageListFragment --- .../com/moez/QKSMS/ui/messagelist/MessageListFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/messagelist/MessageListFragment.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/messagelist/MessageListFragment.java index 5a4517a4..999a605f 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/messagelist/MessageListFragment.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/messagelist/MessageListFragment.java @@ -1,5 +1,6 @@ package com.moez.QKSMS.ui.messagelist; +import android.app.Activity; import android.app.AlertDialog; import android.app.LoaderManager; import android.content.ClipData; @@ -218,8 +219,8 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa } @Override - public void onStart() { - super.onStart(); + public void onAttach(Activity activity) { + super.onAttach(activity); // Make sure to notify that this conversation has been opened. This will mark it as read, load new drafts, etc. onOpenConversation();