We can have numUnreadMentions > 0 and numUnreadMessages == 0, in this case, display both icons.
This commit is contained in:
parent
f45b4e6120
commit
a83cafd6b7
2 changed files with 14 additions and 10 deletions
|
|
@ -204,8 +204,8 @@ private fun RowScope.NotificationIcons(room: RoomListRoomSummary) {
|
||||||
imageVector = CompoundIcons.Mention,
|
imageVector = CompoundIcons.Mention,
|
||||||
tint = ElementTheme.colors.unreadIndicator,
|
tint = ElementTheme.colors.unreadIndicator,
|
||||||
)
|
)
|
||||||
}
|
UnreadIndicatorAtom()
|
||||||
if (room.numUnreadMessages > 0) {
|
} else if (room.numUnreadMessages > 0) {
|
||||||
UnreadIndicatorAtom()
|
UnreadIndicatorAtom()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -217,13 +217,9 @@ private fun RowScope.NotificationIcons(room: RoomListRoomSummary) {
|
||||||
imageVector = CompoundIcons.Mention,
|
imageVector = CompoundIcons.Mention,
|
||||||
tint = ElementTheme.colors.unreadIndicator,
|
tint = ElementTheme.colors.unreadIndicator,
|
||||||
)
|
)
|
||||||
if (room.numUnreadMessages > 0) {
|
UnreadIndicatorAtom()
|
||||||
UnreadIndicatorAtom()
|
} else if (room.numUnreadMessages > 0) {
|
||||||
}
|
UnreadIndicatorAtom(color = ElementTheme.colors.iconQuaternary)
|
||||||
} else {
|
|
||||||
if (room.numUnreadMessages > 0) {
|
|
||||||
UnreadIndicatorAtom(color = ElementTheme.colors.iconQuaternary)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RoomNotificationMode.MUTE -> {
|
RoomNotificationMode.MUTE -> {
|
||||||
|
|
@ -233,7 +229,7 @@ private fun RowScope.NotificationIcons(room: RoomListRoomSummary) {
|
||||||
imageVector = CompoundIcons.NotificationsSolidOff,
|
imageVector = CompoundIcons.NotificationsSolidOff,
|
||||||
tint = ElementTheme.colors.iconQuaternary,
|
tint = ElementTheme.colors.iconQuaternary,
|
||||||
)
|
)
|
||||||
if (room.numUnreadMessages > 0) {
|
if (room.numUnreadMessages > 0 || room.numUnreadMentions > 0) {
|
||||||
UnreadIndicatorAtom(color = ElementTheme.colors.iconQuaternary)
|
UnreadIndicatorAtom(color = ElementTheme.colors.iconQuaternary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,14 @@ open class RoomListRoomSummaryProvider : PreviewParameterProvider<RoomListRoomSu
|
||||||
numUnreadMentions = 1,
|
numUnreadMentions = 1,
|
||||||
hasOngoingCall = hasCall,
|
hasOngoingCall = hasCall,
|
||||||
),
|
),
|
||||||
|
aRoomListRoomSummary(
|
||||||
|
name = roomNotificationMode.name,
|
||||||
|
lastMessage = "New mentions" + if (hasCall) ", call" else "",
|
||||||
|
notificationMode = roomNotificationMode,
|
||||||
|
numUnreadMessages = 0,
|
||||||
|
numUnreadMentions = 1,
|
||||||
|
hasOngoingCall = hasCall,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}.flatten()
|
}.flatten()
|
||||||
}.flatten(),
|
}.flatten(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue