mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +03:00
use X-Chat-Last-Common-Read to fix read status
Without this commit, the read status was broken as X-Chat-Last-Common-Read was not used. It was removed by https://github.com/nextcloud/talk-android/pull/3630 As a result all messages were marked as unread after waiting for 30 seconds. With this commit the X-Chat-Last-Common-Read is used again. Messages are marked as read again also after 30 seconds. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
f65b7074da
commit
2e317b134c
1 changed files with 6 additions and 2 deletions
|
@ -918,7 +918,11 @@ class ChatActivity :
|
|||
collapseSystemMessages()
|
||||
}
|
||||
|
||||
updateReadStatusOfAllMessages(chatMessageList[0].jsonMessageId)
|
||||
val newXChatLastCommonRead = state.response.headers()["X-Chat-Last-Common-Read"]?.let {
|
||||
Integer.parseInt(it)
|
||||
}
|
||||
|
||||
updateReadStatusOfAllMessages(newXChatLastCommonRead)
|
||||
|
||||
processCallStartedMessages(chatMessageList)
|
||||
|
||||
|
@ -927,7 +931,7 @@ class ChatActivity :
|
|||
chatViewModel.refreshChatParams(
|
||||
setupFieldsForPullChatMessages(
|
||||
true,
|
||||
chatMessageList[0].jsonMessageId,
|
||||
newXChatLastCommonRead,
|
||||
true
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue