[WIP] Saved messages

This commit is contained in:
Isaac
2023-12-12 14:05:58 +04:00
parent 168d97abdd
commit b34a495945
55 changed files with 805 additions and 444 deletions

View File

@@ -57,7 +57,7 @@ func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Cha
return nil
}
func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: ChatPresentationInterfaceState, strings: PresentationStrings, currentButton: ChatNavigationButton?, target: Any?, selector: Selector?, chatInfoNavigationButton: ChatNavigationButton?, moreInfoNavigationButton: ChatNavigationButton?) -> ChatNavigationButton? {
func rightNavigationButtonForChatInterfaceState(context: AccountContext, presentationInterfaceState: ChatPresentationInterfaceState, strings: PresentationStrings, currentButton: ChatNavigationButton?, target: Any?, selector: Selector?, chatInfoNavigationButton: ChatNavigationButton?, moreInfoNavigationButton: ChatNavigationButton?) -> ChatNavigationButton? {
if let _ = presentationInterfaceState.interfaceState.selectionState {
if case .messageOptions = presentationInterfaceState.subject {
return nil
@@ -71,6 +71,10 @@ func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Ch
}
}
if case let .replyThread(message) = presentationInterfaceState.chatLocation, message.messageId.peerId == context.account.peerId {
return chatInfoNavigationButton
}
if let channel = presentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.flags.contains(.isForum), let moreInfoNavigationButton = moreInfoNavigationButton {
if case .replyThread = presentationInterfaceState.chatLocation {
} else {