fix(ContactsColumn): call `itemAt` on statusChatListItems.model instead of delegate

When StatusQ switched to using `DelegateModel` in `StatusChatList` to enable drag and drop,
we lost the API `itemAt` which was previously exposed via the `Repeater` that was aliased as
`chatListItems`.

StatusQ now exposes `statusChatListItems` additionally so we can still access `model.itemAt`
which is used in this commit.

The only reason this is done here though, is because we need to update the profile picture of
contacts when we get a contact changed signal. Ideally, we handle contact changes including the
profile picture entirely in the backend and have it then just rerender the screen (instead of
using a `Connection`).

Fixes #3328
This commit is contained in:
Pascal Precht 2021-09-16 16:05:25 +02:00 committed by Iuri Matias
parent 5f95a1fb4f
commit 8d283bf07f
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 1d12d222f35abd3d66d124b45039d5f8e8d7d30c
Subproject commit 80956108738f9e492f2ff98d0337a8f6f792fbf0

View File

@ -229,7 +229,7 @@ Item {
target: profileModel.contacts.list
onContactChanged: {
for (var i = 0; i < channelList.chatListItems.count; i++) {
let chatItem = channelList.chatListItems.itemAt(i);
let chatItem = channelList.statusChatListItems.model.itemAt(i);
if (chatItem.chatId === pubkey) {
let profileImage = appMain.getProfileImage(pubkey)
if (!!profileImage) {