-
Notifications
You must be signed in to change notification settings - Fork 274
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
[AND-25] Threads V2 offline support #5481
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # stream-chat-android-compose/api/stream-chat-android-compose.api
# Conflicts: # CHANGELOG.md # docusaurus/sidebars-android.js # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ThreadMapping.kt # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/ThreadDtos.kt # stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadItem.kt # stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadList.kt # stream-chat-android-core/api/stream-chat-android-core.api # stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ThreadInfo.kt # stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ThreadParticipant.kt # stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/internal/LogicRegistry.kt # stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogic.kt # stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsStateLogic.kt # stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogicTest.kt # stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsStateLogicTest.kt # stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/state/querythreads/internal/QueryThreadsMutableStateTest.kt
DB Entities have been updated. Do we need to upgrade DB Version?
|
JcMinarro
approved these changes
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Goal
The PR includes 2 significant changes:
NotificationMarkUnread
event, which now correctly delivers athreadId
, if the event is delivered when marking a thread🛠 Implementation details
ThreadEntity
- DB model for the domainThread
model.ThreadOrderEntity
- DB model which persists the order of the threads as initially delivered from BE (we don't know the exact sorting the BE does, so this is a way of persisting the same order)ThreadDao
andThreadOrderDao
for DB interactionThreadRepository
with two implementations:DatabaseThreadRepository
and the fallbackNoOpThreadRepository
QueryThreadsListenerDatabase
which inserts thread data into the DB after every successfulHTTP queryThreads()
call.QueryThreadsLogic
to pre-populate theQueryThreadsState
with previously fetched offline dataNewMessageEvent
,DeleteMessageEvent
,UpdateMessageEvent
,ReactionNewEvent
,ReactionUpdatedEvent
,ReactionDeletedEvent
,MessageReadEvent
,NotificationMarkUnreadEvent
RepositoryFacade
to ensure thread data is updated when callinginsertMessage
,insertMessages
ordeleteChannel
Thread
update methods such asupdateParent/upsertReply/...
toclient.extensions.internal.Thread
file🧪 Testing
Threads
tabThreads
tab☑️Contributor Checklist
General
develop
branchCode & documentation
☑️Reviewer Checklist
🎉 GIF
Please provide a suitable gif that describes your work on this pull request