-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: conversation list pagination [WPB-9433] #3509
Conversation
…conversation-list-pagination # Conflicts: # app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt # app/src/test/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModelTest.kt
…st when query changes
…conversation-list-pagination
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
…conversation-list-pagination
Quality Gate passedIssues Measures |
Built wire-android-staging-compat-pr-3509.apk is available for download |
Built wire-android-dev-debug-pr-3509.apk is available for download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 Just one cosmetic comment
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
The current implementation of the conversation screen retrieves all conversation data from the database at once. This approach leads to performance issues and increased startup times, especially as the volume of data grows. To improve performance and reduce startup time, we need to implement pagination for fetching conversation data.
Solutions
Integrated changes from these two kalium PRs related to conversation list pagination:
wireapp/kalium#3055
wireapp/kalium#3059
Created new use case
GetConversationsFromSearchUseCase
to fetch paginated conversations and map them properly.Added loading state for conversation list before the list is initially fetched, to not show empty content.
In view models, combined both flows of collecting search query changes and fetching results into single one to not lose
ItemSnapshotList
when query changes which would make the list to become empty between each query changes. This required movingsearchQuery
parameter to the data of each list item instead.Removed code responsible for searching by filtering result list from view models as now searching is executed in kalium so view models should just execute use case and handle results.
Updated
keepOnTopWhenNotScrolled
to also work when the list might be updated without recomposition (like with pagination).Dependencies (Optional)
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Open the app and scroll and search for conversations on all conversations list screen, archive screen or import media screen.
Attachments (Optional)
paginated_conversation.mp4
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.