-
Notifications
You must be signed in to change notification settings - Fork 211
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
Fix updating channel's preview message when coming back to online #3574
base: develop
Are you sure you want to change the base?
Conversation
// Ignore cache when inserted (but not yet saved) object id is present | ||
guard !objectIds.contains(where: { $0.isTemporaryID }) else { return false } | ||
// Context has pending inserted or deleted objects of this type (can affect ids returned by the fetch request) | ||
guard !insertedObjects.contains(where: { $0 is T }) && !deletedObjects.contains(where: { $0 is T }) else { return false } |
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.
Theoretically speaking even updatedObjects
could change results, but this will take away the benefit of the cache. Based on the history, it was added for speeding up channel list payload writes.
20c98c7
to
4c1f1b3
Compare
SDK Size
|
SDK Performance
|
Quality Gate passedIssues Measures |
SDK Size
|
# Conflicts: # CHANGELOG.md
@testableapple found that in some cases the preview message can end up being nil and then the channel list shows "No messages" as the preview. Reproduced it once, but don't know which code path triggers. |
🔗 Issue Links
Resolves IOS-680
🎯 Goal
Channel's preview message did not update when coming back online
📝 Summary
🛠 Implementation
Ignore cached results if there are new objects inserted or deleted for that type.
🎨 Showcase
Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.
🧪 Manual Testing Notes
☑️ Contributor Checklist
docs-content
repo