-
Notifications
You must be signed in to change notification settings - Fork 791
Live sessions list #1905
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
Live sessions list #1905
Conversation
.map { it.userId } | ||
).distinct() | ||
val usersList = (deviceInfoList.map { it.userId } + signingKeyInfoList.map { it.userId }) | ||
.distinct() |
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.
This is just formatting
.throttleLast(5_000, TimeUnit.MILLISECONDS) | ||
.map { it.size } | ||
.distinctUntilChanged() | ||
.throttleFirst(5_000, TimeUnit.MILLISECONDS) |
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.
throttle first is better
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 think that I made it to wait a bit mainly for the first time. If not just after a new session you could have verification alerts coming to fast
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.
Ok, I revert
to merge
Rx: use distinctUntilChanged() instead of distinct()
172248c
to
7a2454d
Compare
.map { it.userId } | ||
).distinct() | ||
val usersList = (deviceInfoList.map { it.userId } + signingKeyInfoList.map { it.userId }) | ||
.distinct() |
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.
this is just formatting
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.
please see my comment
When another session was remotely deleted (i.e. signed out), the session list was not updating correctly.
Fix other RX similar issues.
First commit is just a renaming