Support refreshDueToExternalTransaction in more views

This commit is contained in:
Ali
2021-11-04 21:09:34 +04:00
parent 9290df840d
commit ddb0999af0
36 changed files with 407 additions and 15 deletions

View File

@@ -19,6 +19,16 @@ final class MutablePeerNotificationSettingsBehaviorTimestampView: MutablePostbox
return updated
}
func refreshDueToExternalTransaction(postbox: PostboxImpl) -> Bool {
let earliestTimestamp = postbox.peerNotificationSettingsBehaviorTable.getEarliest()?.1
if self.earliestTimestamp != earliestTimestamp {
self.earliestTimestamp = earliestTimestamp
return true
} else {
return false
}
}
func immutableView() -> PostboxView {
return PeerNotificationSettingsBehaviorTimestampView(self)