ios: fix opening direct chats (#555)

This commit is contained in:
Evgeny Poberezkin
2022-04-23 08:35:56 +01:00
committed by GitHub
parent 0091e9f162
commit e6fdb40c59

View File

@@ -16,7 +16,14 @@ struct ChatListNavLink: View {
var body: some View {
switch chat.chatInfo {
case let .direct(contact):
contactNavLink(contact)
if contact.ready {
contactNavLink(contact)
} else {
contactNavLink(contact)
.onTapGesture {
AlertManager.shared.showAlert(pendingContactAlert(chat, contact))
}
}
case let .group(groupInfo):
groupNavLink(groupInfo)
case let .contactRequest(cReq):
@@ -62,11 +69,6 @@ struct ChatListNavLink: View {
Label("Delete", systemImage: "trash")
}
}
.onTapGesture {
if !contact.ready {
AlertManager.shared.showAlert(pendingContactAlert(chat, contact))
}
}
.frame(height: 80)
}