mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
Set pages to be every 50 messages
Large enough to prevent onLoadMore from calling refresh on a few messages, but small enough to refresh when needed. Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
188aed721d
commit
57017f95f4
1 changed files with 2 additions and 1 deletions
|
@ -3968,7 +3968,7 @@ class ChatActivity :
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLoadMore(page: Int, totalItemsCount: Int) {
|
override fun onLoadMore(page: Int, totalItemsCount: Int) {
|
||||||
val calculatedPage = page / MESSAGE_PULL_LIMIT
|
val calculatedPage = totalItemsCount / PAGE_SIZE
|
||||||
if (calculatedPage > 0) {
|
if (calculatedPage > 0) {
|
||||||
chatViewModel.refreshChatParams(
|
chatViewModel.refreshChatParams(
|
||||||
setupFieldsForPullChatMessages(
|
setupFieldsForPullChatMessages(
|
||||||
|
@ -4991,5 +4991,6 @@ class ChatActivity :
|
||||||
private const val CURRENT_AUDIO_POSITION_KEY = "CURRENT_AUDIO_POSITION"
|
private const val CURRENT_AUDIO_POSITION_KEY = "CURRENT_AUDIO_POSITION"
|
||||||
private const val CURRENT_AUDIO_WAS_PLAYING_KEY = "CURRENT_AUDIO_PLAYING"
|
private const val CURRENT_AUDIO_WAS_PLAYING_KEY = "CURRENT_AUDIO_PLAYING"
|
||||||
private const val RESUME_AUDIO_TAG = "RESUME_AUDIO_TAG"
|
private const val RESUME_AUDIO_TAG = "RESUME_AUDIO_TAG"
|
||||||
|
private const val PAGE_SIZE = 50
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue