feat(channel): show channels with unread messages even if collapsed (#17017)

Fixes #17016

Sets the channel as visible when it has unread messages, but not muted, or has a notification (reply or mention) or it's active, even when collapsed.
This commit is contained in:
Jonathan Rainville 2025-01-22 10:03:41 -05:00 committed by GitHub
parent b6bc5d1e29
commit d8b94f5eb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,7 +170,13 @@ Item {
objectName: model.name
Layout.fillWidth: true
height: visible ? (statusChatListItem.implicitHeight + 4) /*spacing between non-collapsed items*/ : 0
visible: (!draggableItem.isCategory && model.categoryOpened)
visible: !draggableItem.isCategory &&
(
model.active ||
(!model.muted && model.hasUnreadMessages) || // Show channel if it has unread messages but not muted
model.notificationsCount > 0 || // unless it's a notification (mentions, replies)
model.categoryOpened
)
originalOrder: model.position
chatId: model.itemId
categoryId: model.categoryId