Skip to content

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

Merged
merged 3 commits into from
Aug 13, 2020
Merged

Live sessions list #1905

merged 3 commits into from
Aug 13, 2020

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Aug 12, 2020

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

@bmarty bmarty requested a review from BillCarsonFr August 12, 2020 13:23
.map { it.userId }
).distinct()
val usersList = (deviceInfoList.map { it.userId } + signingKeyInfoList.map { it.userId })
.distinct()
Copy link
Member Author

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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throttle first is better

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I revert

bmarty and others added 2 commits August 13, 2020 16:24
to merge
Rx: use distinctUntilChanged() instead of distinct()
@bmarty bmarty force-pushed the feature/refresh_device_list branch from 172248c to 7a2454d Compare August 13, 2020 14:27
.map { it.userId }
).distinct()
val usersList = (deviceInfoList.map { it.userId } + signingKeyInfoList.map { it.userId })
.distinct()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just formatting

Copy link
Member

@BillCarsonFr BillCarsonFr left a 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

@bmarty bmarty merged commit 81a4b5e into develop Aug 13, 2020
@bmarty bmarty deleted the feature/refresh_device_list branch August 13, 2020 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants