From a664f635a766b2222eed764e2f43d9e384e36948 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Wed, 30 Jun 2021 16:12:21 +0200 Subject: [PATCH] feat(StatusChatList): expose hook to lazily calculate chat item names --- src/StatusQ/Components/StatusChatList.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/StatusQ/Components/StatusChatList.qml b/src/StatusQ/Components/StatusChatList.qml index f7a0e36b..9bcdf5fc 100644 --- a/src/StatusQ/Components/StatusChatList.qml +++ b/src/StatusQ/Components/StatusChatList.qml @@ -19,6 +19,7 @@ Column { property var filterFn property var profileImageFn + property var chatNameFn signal chatItemSelected(string id) signal chatItemUnmuted(string id) @@ -44,7 +45,7 @@ Column { } chatId: model.chatId || model.id - name: model.name + name: !!statusChatList.chatNameFn ? statusChatList.chatNameFn(model) : model.name type: model.chatType muted: !!model.muted hasUnreadMessages: !!model.hasUnreadMessages || model.unviewedMessagesCount > 0