mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-18 11:30:04 +00:00
24 lines
591 B
Swift
24 lines
591 B
Swift
import Foundation
|
|
|
|
public enum ChatLocation: Equatable {
|
|
case peer(PeerId)
|
|
case group(PeerGroupId)
|
|
|
|
public static func ==(lhs: ChatLocation, rhs: ChatLocation) -> Bool {
|
|
switch lhs {
|
|
case let .peer(id):
|
|
if case .peer(id) = rhs {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
case let .group(id):
|
|
if case .group(id) = rhs {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|