mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Fix room list cell highlighting issues, add unit tests
This commit is contained in:
@@ -197,7 +197,7 @@ extension HomeScreenRoom {
|
||||
let isMentionShown = details.hasUnreadMentions && !details.isMuted
|
||||
let isMuteShown = details.isMuted
|
||||
let isCallShown = details.hasOngoingCall
|
||||
let isHighlighted = !details.isMuted && (details.hasUnreadNotifications || details.hasUnreadMentions || details.isMarkedUnread)
|
||||
let isHighlighted = details.isMarkedUnread || (!details.isMuted && (details.hasUnreadNotifications || details.hasUnreadMentions))
|
||||
|
||||
self.init(id: identifier,
|
||||
roomId: details.id,
|
||||
|
||||
@@ -119,26 +119,23 @@ struct HomeScreenRoomCell: View {
|
||||
HStack(spacing: 8) {
|
||||
if room.badges.isCallShown {
|
||||
CompoundIcon(\.videoCallSolid, size: .xSmall, relativeTo: .compound.bodySM)
|
||||
.foregroundColor(room.isHighlighted ? .compound.iconAccentTertiary : .compound.iconQuaternary)
|
||||
}
|
||||
|
||||
if room.badges.isMuteShown {
|
||||
CompoundIcon(\.notificationsOffSolid, size: .custom(15), relativeTo: .compound.bodyMD)
|
||||
.accessibilityLabel(L10n.a11yNotificationsMuted)
|
||||
.foregroundColor(.compound.iconQuaternary)
|
||||
}
|
||||
|
||||
if room.badges.isMentionShown {
|
||||
mentionIcon
|
||||
.foregroundColor(.compound.iconAccentTertiary)
|
||||
}
|
||||
|
||||
if room.badges.isDotShown {
|
||||
Circle()
|
||||
.frame(width: 12, height: 12)
|
||||
.foregroundColor(room.isHighlighted ? .compound.iconAccentTertiary : .compound.iconQuaternary)
|
||||
}
|
||||
}
|
||||
.foregroundColor(room.isHighlighted ? .compound.iconAccentTertiary : .compound.iconQuaternary)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user