From 962263e6e65b327cca64a443649f3490b0df3a31 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 10 Feb 2014 23:12:11 +0100 Subject: [PATCH] small bugfix. messages were not marked as read when conversation was open --- src/de/gultsch/chat/ui/ConversationFragment.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java index 7305bcfb6..81dc1d265 100644 --- a/src/de/gultsch/chat/ui/ConversationFragment.java +++ b/src/de/gultsch/chat/ui/ConversationFragment.java @@ -11,13 +11,10 @@ import de.gultsch.chat.utils.PhoneHelper; import de.gultsch.chat.utils.UIHelper; import android.app.Fragment; import android.content.SharedPreferences; -import android.database.Cursor; -import android.graphics.Bitmap; import android.graphics.Typeface; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; -import android.provider.ContactsContract.Profile; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -212,5 +209,10 @@ public class ConversationFragment extends Fragment { int size = this.messageList.size(); if (size >= 1) messagesView.setSelection(size - 1); + ConversationActivity activity = (ConversationActivity) getActivity(); + if (!activity.shouldPaneBeOpen()) { + conversation.markRead(); + activity.updateConversationList(); + } } }