2
0
mirror of synced 2025-02-18 09:36:24 +00:00

feat(StatusChatList): expose hook to lazily calculate chat item names

This commit is contained in:
Pascal Precht 2021-06-30 16:12:21 +02:00
parent fd7a5530cf
commit a664f635a7
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D

View File

@ -19,6 +19,7 @@ Column {
property var filterFn property var filterFn
property var profileImageFn property var profileImageFn
property var chatNameFn
signal chatItemSelected(string id) signal chatItemSelected(string id)
signal chatItemUnmuted(string id) signal chatItemUnmuted(string id)
@ -44,7 +45,7 @@ Column {
} }
chatId: model.chatId || model.id chatId: model.chatId || model.id
name: model.name name: !!statusChatList.chatNameFn ? statusChatList.chatNameFn(model) : model.name
type: model.chatType type: model.chatType
muted: !!model.muted muted: !!model.muted
hasUnreadMessages: !!model.hasUnreadMessages || model.unviewedMessagesCount > 0 hasUnreadMessages: !!model.hasUnreadMessages || model.unviewedMessagesCount > 0