PostboxView
protocol
PostboxView
MutablePostboxView
protocol
MutablePostboxView
1
2
3
func replay(postbox: PostboxImpl, transaction: PostboxTransaction) -> Bool
func refreshDueToExternalTransaction(postbox: PostboxImpl) -> Bool
func immutableView() -> PostboxView
CombinedView
class
CombinedView
1
public let views: [PostboxViewKey: PostboxView]
CombinedMutableView
class
CombinedMutableView
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
private let views: [PostboxViewKey: MutablePostboxView]
func replay(postbox: PostboxImpl, transaction: PostboxTransaction) -> Bool {
var updated = false
for (_, view) in self.views {
if view.replay(postbox: postbox, transaction: transaction) {
updated = true
}
}
return updated
}
func refreshDueToExternalTransaction(postbox: PostboxImpl) -> Bool {
var updated = false
for (_, view) in self.views {
if view.refreshDueToExternalTransaction(postbox: postbox) {
updated = true
}
}
return updated
}
func immutableView() -> CombinedView {
var result: [PostboxViewKey: PostboxView] = [:]
for (key, view) in self.views {
result[key] = view.immutableView()
}
return CombinedView(views: result)
}