From 2a37b5491c5b82c3dba1f640f0fd3816013d4040 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 18 Jul 2025 13:39:35 +0400 Subject: [PATCH] more contexts --- apps/ios/Shared/Views/Chat/ChatView.swift | 27 +++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index b75bcb8715..2ca020e185 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -869,12 +869,31 @@ struct ChatView: View { func chatContext() -> String? { switch chat.chatInfo { - case .direct: NSLocalizedString("Contact", comment: "chat context") + case let .direct(contact): + if contact.nextConnectPrepared, let linkType = contact.preparedContact?.uiConnLinkType { + switch linkType { + case .inv: + NSLocalizedString("1-time invitation", comment: "chat context") + case .con: + NSLocalizedString("Contact address", comment: "chat context") + } + } else if contact.nextAcceptContactRequest { + NSLocalizedString("Contact request", comment: "chat context") + } else { + NSLocalizedString("Contact", comment: "chat context") + } case let .group(groupInfo, _): switch groupInfo.businessChat?.chatType { - case .none: NSLocalizedString("Group", comment: "chat context") - case .business: NSLocalizedString("Business", comment: "chat context") - case .customer: NSLocalizedString("Customer", comment: "chat context") + case .none: + if groupInfo.membership.memberStatus == .memCreator { + NSLocalizedString("Your group", comment: "chat context") + } else { + NSLocalizedString("Group", comment: "chat context") + } + case .business: + NSLocalizedString("Business", comment: "chat context") + case .customer: + NSLocalizedString("Customer", comment: "chat context") } default: nil }