mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-19 04:00:54 +00:00
27 lines
599 B
Swift
27 lines
599 B
Swift
import Foundation
|
|
|
|
final class MutableContactPeerIdsView {
|
|
fileprivate var peerIds: Set<PeerId>
|
|
|
|
init(peerIds: Set<PeerId>) {
|
|
self.peerIds = peerIds
|
|
}
|
|
|
|
func replay(replace replacePeerIds: Set<PeerId>) -> Bool {
|
|
if self.peerIds != replacePeerIds {
|
|
self.peerIds = replacePeerIds
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
|
|
public final class ContactPeerIdsView {
|
|
public let peerIds: Set<PeerId>
|
|
|
|
init(_ mutableView: MutableContactPeerIdsView) {
|
|
self.peerIds = mutableView.peerIds
|
|
}
|
|
}
|