mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-11 19:45:00 +00:00
verified marker
This commit is contained in:
@@ -25,8 +25,7 @@ struct ContactListNavLink: View {
|
||||
HStack{
|
||||
ProfileImage(imageStr: contact.image, size: 38)
|
||||
.padding(.trailing, 2)
|
||||
Text(contact.chatViewName)
|
||||
.lineLimit(1)
|
||||
previewTitle()
|
||||
if contact.contactConnIncognito {
|
||||
Spacer()
|
||||
Image(systemName: "theatermasks")
|
||||
@@ -38,6 +37,23 @@ struct ContactListNavLink: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder private func previewTitle() -> some View {
|
||||
let t = Text(chat.chatInfo.chatViewName)
|
||||
(
|
||||
contact.verified == true
|
||||
? verifiedIcon + t
|
||||
: t
|
||||
)
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
||||
private var verifiedIcon: Text {
|
||||
(Text(Image(systemName: "checkmark.shield")) + Text(" "))
|
||||
.foregroundColor(.secondary)
|
||||
.baselineOffset(1)
|
||||
.kerning(-2)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
||||
@@ -269,7 +269,7 @@ struct HomeView: View {
|
||||
}
|
||||
|
||||
@ViewBuilder private func chatView() -> some View {
|
||||
// TODO changing alias doesn't update list
|
||||
// TODO changing alias / verification doesn't update list
|
||||
if let chatId = chatModel.chatId, let chat = chatModel.getChat(chatId) {
|
||||
ChatView(chat: chat).onAppear {
|
||||
loadChat(chat: chat)
|
||||
|
||||
Reference in New Issue
Block a user