mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 13:35:33 +03:00
Make setReadMarker parameter boolean
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
3d6674e35a
commit
21606bc9c1
1 changed files with 9 additions and 4 deletions
|
@ -2016,7 +2016,7 @@ class ChatController(args: Bundle) :
|
|||
if (isFirstMessagesProcessing) {
|
||||
pullChatMessages(false)
|
||||
} else {
|
||||
pullChatMessages(true, 0)
|
||||
pullChatMessages(true, false)
|
||||
}
|
||||
|
||||
if (webSocketInstance != null) {
|
||||
|
@ -2234,7 +2234,7 @@ class ChatController(args: Bundle) :
|
|||
}
|
||||
}
|
||||
|
||||
fun pullChatMessages(lookIntoFuture: Boolean, setReadMarker: Int = 1, xChatLastCommonRead: Int? = null) {
|
||||
fun pullChatMessages(lookIntoFuture: Boolean, setReadMarker: Boolean = true, xChatLastCommonRead: Int? = null) {
|
||||
if (!validSessionId()) {
|
||||
return
|
||||
}
|
||||
|
@ -2277,7 +2277,12 @@ class ChatController(args: Bundle) :
|
|||
}
|
||||
|
||||
fieldMap["limit"] = MESSAGE_PULL_LIMIT
|
||||
fieldMap["setReadMarker"] = setReadMarker
|
||||
|
||||
if (setReadMarker) {
|
||||
fieldMap["setReadMarker"] = 1
|
||||
} else {
|
||||
fieldMap["setReadMarker"] = 0
|
||||
}
|
||||
|
||||
val lastKnown = if (lookIntoFuture) {
|
||||
globalLastKnownFutureMessageId
|
||||
|
@ -2457,7 +2462,7 @@ class ChatController(args: Bundle) :
|
|||
adapter?.notifyDataSetChanged()
|
||||
|
||||
if (validSessionId()) {
|
||||
pullChatMessages(true, 1, xChatLastCommonRead)
|
||||
pullChatMessages(true, true, xChatLastCommonRead)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue