From e6fdb40c5967ed7b3a47e35b6a254c1d64d413c2 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sat, 23 Apr 2022 08:35:56 +0100 Subject: [PATCH] ios: fix opening direct chats (#555) --- .../Shared/Views/ChatList/ChatListNavLink.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift b/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift index 6689d8f5db..d6937007ba 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift @@ -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) }