Swiftgram/Postbox/PostboxStateView.swift
2017-02-07 22:33:14 +03:00

23 lines
418 B
Swift

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