From d52cbb8e8c62ec78d3f13a09bab45eff7ac397ca Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 27 Mar 2023 11:18:29 +0200 Subject: [PATCH] fix message comparator --- .../android/ui/adapter/ChatOverviewComparator.java | 1 - .../conversations/android/ui/adapter/MessageComparator.java | 6 +++--- .../android/ui/fragment/main/ChatFragment.java | 5 +---- .../im/conversations/android/ui/model/ChatViewModel.java | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/im/conversations/android/ui/adapter/ChatOverviewComparator.java b/app/src/main/java/im/conversations/android/ui/adapter/ChatOverviewComparator.java index ba2641dd3..184916a3f 100644 --- a/app/src/main/java/im/conversations/android/ui/adapter/ChatOverviewComparator.java +++ b/app/src/main/java/im/conversations/android/ui/adapter/ChatOverviewComparator.java @@ -13,7 +13,6 @@ public class ChatOverviewComparator extends DiffUtil.ItemCallback { - LOGGER.info("submitData()"); - messageAdapter.submitData(getLifecycle(), pagingData); - }); + pagingData -> messageAdapter.submitData(getLifecycle(), pagingData)); this.binding.materialToolbar.setNavigationOnClickListener( view -> { NavControllers.findNavController(requireActivity(), R.id.nav_host_fragment) diff --git a/app/src/main/java/im/conversations/android/ui/model/ChatViewModel.java b/app/src/main/java/im/conversations/android/ui/model/ChatViewModel.java index 3b128d486..c6e9af226 100644 --- a/app/src/main/java/im/conversations/android/ui/model/ChatViewModel.java +++ b/app/src/main/java/im/conversations/android/ui/model/ChatViewModel.java @@ -39,7 +39,7 @@ public class ChatViewModel extends AndroidViewModel { chatId -> { final Pager pager = new Pager<>( - new PagingConfig(30), + new PagingConfig(50), () -> chatRepository.getMessages(chatId)); return PagingLiveData.getLiveData(pager); });