Fix memory leak

This commit is contained in:
Justin Mazzocchi 2020-08-23 22:15:46 -07:00
parent 650e6b2991
commit 3d8fd8d49b
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -23,7 +23,7 @@ class NotificationTypesPreferencesViewModel: ObservableObject {
$pushSubscriptionAlerts
.dropFirst()
.removeDuplicates()
.sink(receiveValue: update(alerts:))
.sink { [weak self] in self?.update(alerts: $0) }
.store(in: &cancellables)
}
}