This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 830
Check each thread for unread messages. #9723
Merged
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
892175d
Check each thread for unread messages.
clokep 1af3346
Fix lint?
clokep 4f8b55a
More lint
clokep 80df691
Add tets.
clokep 252ba69
Remove only call.
clokep c90d481
Enable threads in tests.
justjanne 3eee43e
Additional fixes.
clokep 860f818
Consolidate mocking in tests.
clokep 968d9e9
Strict fixes.
clokep d6dce01
Remove debugging code.
clokep 5854adc
Merge branch 'develop' into unread-threads
clokep 705946c
Use updated syntax.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
I believe
room.getThreads()
is sorted by order of thread discovery in the client side.room.threadsTimelineSets[0].getLiveTimeline().getEvents()
is an array of root events sorted by thread last activity (last item is the newest).We might want to use that to increase our chances to bail early
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.
We need the actual
Thread
objects though (as they implementReadReceipt
), is there a way to get those ordered by activity?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.
you can call
getThread()
on a root event to get theThread
instanceThere 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.
Will
threadTimelineSets
always have a single element in it? Or what is a "timeline set"?The following is giving undefined errors on all tests weirdly:
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.
We create different timelines when there's a gappy sync or if you follow a link to an event way in the past, and each of those timelines have their own pagination tokens.
Maybe the threads timeline sets are created asynchronously. I'll have a look into the code!