mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
refactor and cleanup [skip ci]
This commit is contained in:
22
submodules/Postbox/Sources/PostboxStateView.swift
Normal file
22
submodules/Postbox/Sources/PostboxStateView.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user