Fix preference update pipeline

This commit is contained in:
Justin Mazzocchi 2020-08-30 00:16:37 -07:00
parent 14fc4cdef5
commit 510a6db11e
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
1 changed files with 1 additions and 0 deletions

View File

@ -153,6 +153,7 @@ extension IdentityService {
func updatePreferences(_ preferences: Identity.Preferences) -> AnyPublisher<Never, Error> { func updatePreferences(_ preferences: Identity.Preferences) -> AnyPublisher<Never, Error> {
identityDatabase.updatePreferences(preferences, forIdentityID: identity.id) identityDatabase.updatePreferences(preferences, forIdentityID: identity.id)
.collect()
.zip(Just(self).first().setFailureType(to: Error.self)) .zip(Just(self).first().setFailureType(to: Error.self))
.filter { $1.identity.preferences.useServerPostingReadingPreferences } .filter { $1.identity.preferences.useServerPostingReadingPreferences }
.map { _ in () } .map { _ in () }