Mark the conversation as read when scrolling the chat view to the latest message

This commit is contained in:
Sylvain Berfini 2013-11-29 16:00:48 +01:00
parent 0e445bff1e
commit f882ad1b01

View file

@ -184,7 +184,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (lc != null) {
chatRoom = lc.getOrCreateChatRoom(sipUri);
//Only works if using liblinphone storage
LinphoneActivity.instance().getChatStorage().markConversationAsRead(chatRoom);
chatRoom.markAsRead();
}
if (savedInstanceState != null) {
@ -650,6 +650,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
@Override
public void run() {
messagesScrollView.fullScroll(View.FOCUS_DOWN);
//Only works if using liblinphone storage
chatRoom.markAsRead();
}
}, 100);
}