Skip to content

Commit fd46598

Browse files
authored
Fix pagination issue caused by missing fillTheGap call (#6055)
* Fix pagination issue caused by missing `fillTheGap` call. * Update CHANGELOG.
1 parent e497c76 commit fd46598

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
## stream-chat-android-state
3737
### 🐞 Fixed
38+
- Fix issue causing gaps in the message list due to messages inserted out of order. [#6055](https://github.com/GetStream/stream-chat-android/pull/6055)
3839

3940
### ⬆️ Improved
4041

stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/channel/internal/ChannelLogic.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,7 @@ internal class ChannelLogic(
237237
val offlineChannel = runChannelQueryOffline(request)
238238

239239
val onlineResult = runChannelQueryOnline(request)
240-
.onSuccess {
241-
// Fill the missing messages gap only if loading around ID
242-
if (request.isFilteringAroundIdMessages()) {
243-
fillTheGap(request.messagesLimit(), loadedMessages, it.messages)
244-
}
245-
}
240+
.onSuccess { fillTheGap(request.messagesLimit(), loadedMessages, it.messages) }
246241

247242
return when {
248243
onlineResult is Result.Success -> onlineResult

0 commit comments

Comments
 (0)