-
Notifications
You must be signed in to change notification settings - Fork 155
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
timeline : makes sure to emit empty list if initial reset has no item. #3538
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
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.
LGTM, thanks! Feel free to ignore the comment below, I just wanted to make sure we don't remove this code in the future while thinking it's not needed.
items.chunked(INITIAL_MAX_SIZE).reversed().forEach { | ||
ensureActive() | ||
timelineDiffProcessor.postItems(it) | ||
if (items.isEmpty()) { |
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.
Maybe add a comment for why this is needed? Not a must, though.
2a0ea1e
to
db569cb
Compare
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3538 +/- ##
========================================
Coverage 82.62% 82.62%
========================================
Files 1732 1732
Lines 40939 40939
Branches 4980 4980
========================================
Hits 33827 33827
Misses 5343 5343
Partials 1769 1769 ☔ View full report in Codecov by Sentry. |
} else { | ||
// Split the initial items in multiple list as there is no pagination in the cached data, so we can post timelineItems asap. | ||
items.chunked(INITIAL_MAX_SIZE).reversed().forEach { | ||
ensureActive() |
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.
Interesting to note that
emptyList<Unit>().chunked(5)
return an empty list and not listOf(emptyList())
Content
timeline : makes sure to emit empty list if initial reset has no item.
Motivation and context
Fix empty pinned messages list stuck on loading.
Screenshots / GIFs
Tests
Tested devices
Checklist