Merge branch 'master' into postbox-refactoring-1

This commit is contained in:
Ali
2021-09-03 12:49:58 +04:00
224 changed files with 2988 additions and 2385 deletions

View File

@@ -8,12 +8,12 @@ public func updateContentPrivacySettings(postbox: Postbox, _ f: @escaping (Conte
return postbox.transaction { transaction -> Void in
var updated: ContentPrivacySettings?
transaction.updatePreferencesEntry(key: PreferencesKeys.contentPrivacySettings, { current in
if let current = current as? ContentPrivacySettings {
if let current = current?.get(ContentPrivacySettings.self) {
updated = f(current)
return updated
return PreferencesEntry(updated)
} else {
updated = f(ContentPrivacySettings.defaultSettings)
return updated
return PreferencesEntry(updated)
}
})
}