Swiftgram/submodules/Postbox/Sources/PostboxStateView.swift
2019-11-01 17:11:12 +04:00

23 lines
446 B
Swift

import Foundation
final class MutablePostboxStateView {
var state: PostboxCoding?
init(state: PostboxCoding?) {
self.state = state
}
func replay(updatedState: PostboxCoding) -> Bool {
self.state = updatedState
return true
}
}
public final class PostboxStateView {
public let state: PostboxCoding?
init(_ view: MutablePostboxStateView) {
self.state = view.state
}
}