ios: go to forwarded item or search result (#5679)

* ios: go to forwarded item or search result

* react on touch

* changes
This commit is contained in:
Stanislav Dmitrenko authored and GitHub committed 2025-02-28 14:45:24 +00:00
1 parent b482d4d812
commit fefddb3b5a
11 files changed
+228 -64

No files matched your search

+14
View File
@@ -3261,6 +3261,20 @@ public enum CIForwardedFrom: Decodable, Hashable {
}
}
public var chatTypeApiIdMsgId: (ChatType, Int64, ChatItem.ID?)? {
switch self {
case .unknown: nil
case let .contact(_, _, contactId, msgId):
if let contactId {
(ChatType.direct, contactId, msgId)
} else { nil }
case let .group(_, _, groupId, msgId):
if let groupId {
(ChatType.group, groupId, msgId)
} else { nil }
}
}
public func text(_ chatType: ChatType) -> LocalizedStringKey {
chatType == .local
? (chatName == "" ? "saved" : "saved from \(chatName)")