Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-02-10 00:38:38 +04:00
parent 249b684e64
commit b9e68236d0
37 changed files with 5333 additions and 4729 deletions

View File

@@ -1,5 +1,6 @@
import Foundation
import UIKit
import AsyncDisplayKit
import Postbox
import TelegramCore
import SyncCore
@@ -28,6 +29,9 @@ struct ChatNavigationButton: Equatable {
func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: ChatPresentationInterfaceState, subject: ChatControllerSubject?, strings: PresentationStrings, currentButton: ChatNavigationButton?, target: Any?, selector: Selector?) -> ChatNavigationButton? {
if let _ = presentationInterfaceState.interfaceState.selectionState {
if let _ = presentationInterfaceState.reportReason {
return ChatNavigationButton(action: .spacer, buttonItem: UIBarButtonItem(title: " ", style: .plain, target: nil, action: nil))
}
if case .replyThread = presentationInterfaceState.chatLocation {
return nil
}
@@ -57,13 +61,6 @@ func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Cha
}
}
}
/*if let subject = subject, case .scheduledMessages = subject {
if let currentButton = currentButton, currentButton.action == .dismiss {
return currentButton
} else {
return ChatNavigationButton(action: .dismiss, buttonItem: UIBarButtonItem(title: strings.Common_Done, style: .plain, target: target, action: selector))
}
}*/
return nil
}