mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Support refreshDueToExternalTransaction in more views
This commit is contained in:
@@ -5,6 +5,7 @@ public protocol PostboxView {
|
||||
|
||||
protocol MutablePostboxView {
|
||||
func replay(postbox: PostboxImpl, transaction: PostboxTransaction) -> Bool
|
||||
func refreshDueToExternalTransaction(postbox: PostboxImpl) -> Bool
|
||||
func immutableView() -> PostboxView
|
||||
}
|
||||
|
||||
@@ -24,6 +25,16 @@ final class CombinedMutableView {
|
||||
}
|
||||
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] = [:]
|
||||
|
||||
Reference in New Issue
Block a user