mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Make setReadMarker parameter boolean
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
3d6674e35a
commit
21606bc9c1
@ -2016,7 +2016,7 @@ class ChatController(args: Bundle) :
|
|||||||
if (isFirstMessagesProcessing) {
|
if (isFirstMessagesProcessing) {
|
||||||
pullChatMessages(false)
|
pullChatMessages(false)
|
||||||
} else {
|
} else {
|
||||||
pullChatMessages(true, 0)
|
pullChatMessages(true, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webSocketInstance != null) {
|
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()) {
|
if (!validSessionId()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -2277,7 +2277,12 @@ class ChatController(args: Bundle) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
fieldMap["limit"] = MESSAGE_PULL_LIMIT
|
fieldMap["limit"] = MESSAGE_PULL_LIMIT
|
||||||
fieldMap["setReadMarker"] = setReadMarker
|
|
||||||
|
if (setReadMarker) {
|
||||||
|
fieldMap["setReadMarker"] = 1
|
||||||
|
} else {
|
||||||
|
fieldMap["setReadMarker"] = 0
|
||||||
|
}
|
||||||
|
|
||||||
val lastKnown = if (lookIntoFuture) {
|
val lastKnown = if (lookIntoFuture) {
|
||||||
globalLastKnownFutureMessageId
|
globalLastKnownFutureMessageId
|
||||||
@ -2457,7 +2462,7 @@ class ChatController(args: Bundle) :
|
|||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
|
|
||||||
if (validSessionId()) {
|
if (validSessionId()) {
|
||||||
pullChatMessages(true, 1, xChatLastCommonRead)
|
pullChatMessages(true, true, xChatLastCommonRead)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user