mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-18 11:30:04 +00:00
36 lines
962 B
Swift
36 lines
962 B
Swift
import Foundation
|
|
|
|
/*final class MutablePeerGroupStateView: MutablePostboxView {
|
|
let groupId: PeerGroupId
|
|
var state: PeerGroupState?
|
|
|
|
init(postbox: Postbox, groupId: PeerGroupId) {
|
|
self.groupId = groupId
|
|
self.state = postbox.peerGroupStateTable.get(groupId)
|
|
}
|
|
|
|
func replay(postbox: Postbox, transaction: PostboxTransaction) -> Bool {
|
|
if transaction.currentUpdatedPeerGroupStates.contains(self.groupId) {
|
|
self.state = postbox.peerGroupStateTable.get(self.groupId)
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
|
|
func immutableView() -> PostboxView {
|
|
return PeerGroupStateView(self)
|
|
}
|
|
}
|
|
|
|
public final class PeerGroupStateView: PostboxView {
|
|
public let groupId: PeerGroupId
|
|
public let state: PeerGroupState?
|
|
|
|
init(_ view: MutablePeerGroupStateView) {
|
|
self.groupId = view.groupId
|
|
self.state = view.state
|
|
}
|
|
}
|
|
*/
|