Use countedNotifications instead of our own calculations w/ DMs

This fixes an odd disconnect you can sometimes see when the notification
isn't an invite or a "direct chat notification", which conflicts with
what we use to control the tooltip and visibility.
This commit is contained in:
Joshua Goins
2026-01-15 16:14:42 -05:00
parent 5759f7d82b
commit dc935e09b7

View File

@@ -159,7 +159,7 @@ QQC2.Control {
width: Math.max(directChatNotificationCountTextMetrics.advanceWidth + Kirigami.Units.smallSpacing * 2, height)
height: Kirigami.Units.iconSizes.smallMedium
text: visible ? root.connection.directChatNotifications + root.connection.directChatInvites : ""
text: visible ? directChatButton.countedNotifications : ""
visible: directChatButton.hasCountableNotifications && RoomManager.currentSpace !== "DM"
color: Kirigami.Theme.textColor
horizontalAlignment: Text.AlignHCenter