mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
ios: show muted user profiles in user menu, do not show badge on messages in hidden profiles (#2068)
This commit is contained in:
parent
f349f124d8
commit
b665dce383
2 changed files with 6 additions and 4 deletions
|
@ -85,7 +85,7 @@ struct ChatListView: View {
|
|||
.frame(width: 32, height: 32)
|
||||
.padding(.trailing, 4)
|
||||
let allRead = chatModel.users
|
||||
.filter { !$0.user.activeUser }
|
||||
.filter { u in !u.user.activeUser && !u.user.hidden }
|
||||
.allSatisfy { u in u.unreadCount == 0 }
|
||||
if !allRead {
|
||||
unreadBadge(size: 12)
|
||||
|
|
|
@ -126,7 +126,9 @@ struct UserPicker: View {
|
|||
if user.activeUser {
|
||||
Image(systemName: "checkmark")
|
||||
} else if u.unreadCount > 0 {
|
||||
unreadCounter(u.unreadCount)
|
||||
unreadCounter(u.unreadCount, color: user.showNtfs ? .accentColor : .secondary)
|
||||
} else if !user.showNtfs {
|
||||
Image(systemName: "speaker.slash")
|
||||
}
|
||||
}
|
||||
.padding(.trailing)
|
||||
|
@ -152,13 +154,13 @@ struct UserPicker: View {
|
|||
}
|
||||
}
|
||||
|
||||
func unreadCounter(_ unread: Int) -> some View {
|
||||
private func unreadCounter(_ unread: Int, color: Color) -> some View {
|
||||
unreadCountText(unread)
|
||||
.font(.caption)
|
||||
.foregroundColor(.white)
|
||||
.padding(.horizontal, 4)
|
||||
.frame(minWidth: 18, minHeight: 18)
|
||||
.background(Color.accentColor)
|
||||
.background(color)
|
||||
.cornerRadius(10)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue