status-desktop/ui/app/AppLayouts/Profile/panels
Jonathan Rainville 50132c5a0e
Refactor contacts models to have a single model, remove useless properties and improve updating (#16667)
* refactor(contacts): refactor 5 contact models into one and filter in QML

Fixes #16549

Refactors the 5 types of contact models (all, mutuals, banned, received and sent) into only the `allContacts` and use an Adaptor on the QML side to filter into the needed models.
This cleans the Nim side a lot and makes applying updates to the contacts' model way simpler.

* chore(contacts): remove useless and duplicated contact properties

OptionalName and isSyncing were never used.
DefaultDisplayName was not really used and is actually a duplication of preferredDisplayName, so I replaced the limited usages of DefaultDisplayName by preferredDisplayName

* refactor(contacts): improve updates by not removing and re-adding

We used to update contact items by removing them from the models and re-adding them. This is highly inefficient.
Instead, the proper way is to update only the values that changed.

* user_model: onItemChanged signal removed

* user_model: sorting by online status no longer needed on nim side

* Chat/RootStore: contactsModel property removed

* ContactsStore encapsulation improved

* ContactsStore: contacts model adaptor moved outside store

---------

Co-authored-by: Michał Cieślak <michalcieslak@status.im>
2024-11-28 09:15:34 -05:00
..
CommunitiesListPanel.qml fix(communities): fix missing members in community settings (#16634) 2024-10-28 13:14:25 -04:00
ContactPanel.qml ContactPanel api simplified 2024-10-31 11:11:30 +01:00
ContactsListPanel.qml Refactor contacts models to have a single model, remove useless properties and improve updating (#16667) 2024-11-28 09:15:34 -05:00
NotificationAppearancePreviewPanel.qml [Style] remove legacy Style and its themes 2024-10-22 15:54:31 +02:00
ProfileDescriptionPanel.qml Backend-dependent content removed from Constants, userProfile removed from Global 2024-10-16 23:02:02 +02:00
ProfileShowcaseAccountsPanel.qml feat(@desktop/wallet): Remove network prefixes in Profile, Profile showcase and Profile preview 2024-10-11 18:48:37 +02:00
ProfileShowcaseAssetsPanel.qml feat(ProfileShowcase): Add search input in all tabs 2024-03-08 10:43:07 +01:00
ProfileShowcaseCollectiblesPanel.qml [Style] remove legacy Style and its themes 2024-10-22 15:54:31 +02:00
ProfileShowcaseCommunitiesPanel.qml feat(ProfileShowcase): Implement custom showcase position when searcher text is filtering items 2024-05-16 16:47:42 +03:00
ProfileShowcasePanel.qml remove old code about ID verification and fix trustStatus bug (#16548) 2024-10-29 14:08:12 -04:00
ProfileSocialLinksPanel.qml [Style] remove legacy Style and its themes 2024-10-22 15:54:31 +02:00
StatusNotificationWithDropShadowPanel.qml [Style] remove legacy Style and its themes 2024-10-22 15:54:31 +02:00
SupportedTokenListsPanel.qml [Style] remove legacy Style and its themes 2024-10-22 15:54:31 +02:00
qmldir ContactPanel delegate made backend-independent 2024-10-31 11:11:30 +01:00