Fix room list cell highlighting issues, add unit tests

This commit is contained in:
Stefan Ceriu
2024-02-08 10:08:20 +02:00
parent 60ba71c727
commit d7a190ba23
4 changed files with 243 additions and 5 deletions
@@ -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)
}
}