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
2024-10-29 15:46:09 +01:00
2024-10-29 15:46:09 +01:00
2024-11-25 18:48:45 -03:00
2024-06-27 12:16:30 +02:00
2023-06-09 14:50:08 -04:00
2024-10-10 10:29:12 +03:00
2022-07-14 22:04:33 +02:00
2023-05-31 08:16:28 +02:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-05-20 13:38:04 +03:00
2024-10-24 23:31:21 +02:00
Description
Status Desktop client made in Nim & QML
https://status.app
Readme
Languages
QML 39.2%
JavaScript 29.7%
Nim 18.5%
Python 5.7%
C++ 5.2%
Other 1.6%