mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 10:14:04 +00:00
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>
Refactor contacts models to have a single model, remove useless properties and improve updating (#16667)
Refactor contacts models to have a single model, remove useless properties and improve updating (#16667)
Refactor contacts models to have a single model, remove useless properties and improve updating (#16667)
…
…
…
Status Desktop
Status Desktop client built with Nim and Qt.
Contributing
Our Website
Need Help?
Build Instructions
You have an idea for a cool feature or improvement?
Description
Languages
QML
39.2%
JavaScript
29.7%
Nim
18.5%
Python
5.7%
C++
5.2%
Other
1.6%