8000 [stable-21.0] Bugfix/4492/fix missing users in UI by backportbot[bot] · Pull Request #4677 · nextcloud/talk-android · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[stable-21.0] Bugfix/4492/fix missing users in UI #4677

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
Feb 4, 2025

Conversation

backportbot[bot]
Copy link
@backportbot backportbot bot commented Feb 3, 2025

Backport of PR #4667

…false

Before, getAnyUserAndSetAsActive did only set a random first user to current=true without to check if there is any other current user.

So it was up to the calling function of getAnyUserAndSetAsActive to check this.

I did not identify a scenario where the getAnyUserAndSetAsActive could cause to set multiple users to current, but anyway the new implementation might fix some scenario that i could not reprod
8000
uce.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…tActiveUser() is empty

To make sure getAnyUserAndSetAsActive() is invoked lazily and avoid any side effects, it's explicitly wrapped it in a lambda.

Maybe.defer ensures that getAnyUserAndSetAsActive() is not invoked until switchIfEmpty decides it’s needed.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
usersDao.getActiveUser() will return only one current users even if multiple exist for whatever reason.
By executing setUserAsActiveWithId(it.id) with the same user, it is made sure all other users current status is set to 0.

This change won't fix the root cause if multiple users are set to current, but it will make sure the state is fixed as soon as there is a query to get the active user.

In fact, this change might also make it harder to find the root cause because debugging may be more difficult! When searching for the root cause, always keep this in mind and maybe revert the change.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@backportbot backportbot bot requested review from rapterjet2004 and mahibi February 3, 2025 17:51
@backportbot backportbot bot added the 3. to review Waiting for reviews label Feb 3, 2025
@backportbot backportbot bot added this to the 21.0.0 milestone Feb 3, 2025
Copy link
Contributor
github-actions bot commented Feb 3, 2025

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4677-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

Copy link
Contributor
github-actions bot commented Feb 3, 2025

Codacy

Lint

TypemasterPR
Warnings104104
Errors3636

SpotBugs

CategoryBaseNew
Bad practice66
Correctness222222
Dodgy code7171
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310310

@mahibi mahibi merged commit cc44a62 into stable-21.0 Feb 4, 2025
15 checks passed
@mahibi mahibi deleted the backport/4667/stable-21.0 branch February 4, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0