mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Refactoring [skip ci]
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
public enum ChatNavigationButtonAction: Equatable {
|
||||
case openChatInfo(expandAvatar: Bool)
|
||||
case clearHistory
|
||||
case clearCache
|
||||
case cancelMessageSelection
|
||||
case search
|
||||
case dismiss
|
||||
case toggleInfoPanel
|
||||
case spacer
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user