Swiftgram/Postbox/ChatLocation.swift
2017-12-21 16:44:47 +04:00

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
}
}
}
}