Mark the conversation as read when scrolling the chat view to the latest message
This commit is contained in:
parent
0e445bff1e
commit
f882ad1b01
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue