mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
29 lines
810 B
Swift
29 lines
810 B
Swift
import Foundation
|
|
import UIKit
|
|
|
|
public enum ChatNavigationButtonAction: Equatable {
|
|
case openChatInfo(expandAvatar: Bool, recommendedChannels: Bool)
|
|
case clearHistory
|
|
case clearCache
|
|
case cancelMessageSelection
|
|
case search(hasTags: Bool)
|
|
case dismiss
|
|
case toggleInfoPanel
|
|
case spacer
|
|
case edit
|
|
}
|
|
|
|
public struct ChatNavigationButton: Equatable {
|
|
public let action: ChatNavigationButtonAction
|
|
public let buttonItem: UIBarButtonItem
|
|
|
|
public init(action: ChatNavigationButtonAction, buttonItem: UIBarButtonItem) {
|
|
self.action = action
|
|
self.buttonItem = buttonItem
|
|
}
|
|
|
|
public static func ==(lhs: ChatNavigationButton, rhs: ChatNavigationButton) -> Bool {
|
|
return lhs.action == rhs.action && lhs.buttonItem === rhs.buttonItem
|
|
}
|
|
}
|