-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
[stable-20.0] Feature/4299/improve offline support #4355
Merged
Merged
+258
−169
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
mahibi
approved these changes
Oct 21, 2024
Decrease message limit for retries of message loading make it possible to add any amount (up to 100) of messages to UI for initial loading. add logging only make initial request for chat messages when newest message from DB is not equal the lastReadMessage that is offered by the conversation Signed-off-by: Marcel Hibbe <[email protected]>
… is available Signed-off-by: Marcel Hibbe <[email protected]>
delay progress bar for one second before showing up for slow connection Signed-off-by: Marcel Hibbe <[email protected]>
…adMessage from conversation If conversation has a newer message id than DB then an online request is necessary If conversation has an older message id than DB then an online request is not necessary (this could happen when updating of DB is implemented for push notification, not yet done). If conversation has the same message id like DB than request can be skipped Signed-off-by: Marcel Hibbe <[email protected]>
Mistake was, that the conversations from DB and sync could differ due to values. E.g. when a user changed the status, the conversations from DB and sync would differ. So there were conversations (+related messages&chatBlocks) deleted sometimes. This caused bugs that when entering a chat, all data was loaded again. In the previous implementation (before this PR), this error was only visible in the UI when you were offline (in this case, nothing was displayed!). To fix the bug, only the internalId's are compared. Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
avoid NPE: java.lang.NullPointerException at com.nextcloud.talk.chat.data.network.OfflineFirstChatRepository.getCappedMessagesAmountOfChatBlock(OfflineFirstChatRepository.kt:186) at com.nextcloud.talk.chat.data.network.OfflineFirstChatRepository.access$getCappedMessagesAmountOfChatBlock(OfflineFirstChatRepository.kt:43) at com.nextcloud.talk.chat.data.network.OfflineFirstChatRepository$loadInitialMessages$1.invokeSuspend(OfflineFirstChatRepository.kt:162) Signed-off-by: Marcel Hibbe <[email protected]>
mahibi
force-pushed
the
backport/4300/stable-20.0
branch
from
October 22, 2024 08:36
cb85820
to
0dc4572
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4355-talk.apk |
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.
Backport of PR #4300