status-desktop/ui/app/AppLayouts
Jonathan Rainville 5c75c265af fix(permissions): fix hang when all channel perm check return (#14259)
* fix(permissions): fix hang when all channel perm check return

Fixes #14234

The problem was that we updated **all** the models from **all** the channels of a community each time the channel requirement checks returned.

The fix is to first of all, make sure we don't call that check too often. It sometimes got called twice in a row by accident.

The other better fix is to check if anything actually changed before updating. This solves the issue almost entirely.  Since the permissions almost never change, the updates now take only a second.

* fix(permisisons): never run permission checks for privileged users

Also fixes #14234 but for admins, TMs and Owners.

Admins+ were still getting the hang, because the permission checks always returned something different than the models, because the models knew that admins have access to everything, but the permission check was running as if it were a normal user (I think, un-tested).

Anyway, the solution is more simple, we never need  to run the permission checks on admins+, because they always have access to everything!

* fix(Communities): prevent channels model from emitting unnecessary signals

Closes: #14274

* chore(Communities): improve channels metadata lookup performance

ChannelsSelectionModel is removed, replaced with plain LeftJoinModel.
Transformations of left-side model are done in a single place, not in
every delegate making the join.

* only call update functions when there is something to update + move permission model creation when needed

---------

Co-authored-by: Michał Cieślak <michalcieslak@status.im>
2024-04-04 12:14:39 -04:00
..
Browser chore(@desktop/wallet): Simplify the wallet networks service 2024-03-28 11:47:33 +01:00
Chat fix(@desktop/communities): request to join fixes (#14287) 2024-04-04 18:03:10 +02:00
Communities fix(permissions): fix hang when all channel perm check return (#14259) 2024-04-04 12:14:39 -04:00
Node feat(ActivityCenter): Add indication for visited/unvisited AC state 2023-02-17 16:13:43 +04:00
Onboarding fix[onboarding] Broken links to "Terms" and "Privacy" 2024-03-11 20:30:59 +01:00
Profile fix(ProfileShowcase): Filter out communities the user hasn't joined from 2024-04-02 16:44:16 +03:00
Wallet feat(@desktop/wallet): Collectible Details balance tag 2024-04-03 20:37:45 +02:00
stores chore: fix double permissionsModel preparation 2024-04-04 16:59:26 +02:00