mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Improve API, to avoid ignoring errors
This commit is contained in:
committed by
Benoit Marty
parent
d88ef8769e
commit
a65c290dd3
+6
-2
@@ -76,9 +76,13 @@ class UserPushStoreDataStore(
|
||||
return context.dataStore.data.first()[currentPushKey]
|
||||
}
|
||||
|
||||
override suspend fun setCurrentRegisteredPushKey(value: String) {
|
||||
override suspend fun setCurrentRegisteredPushKey(value: String?) {
|
||||
context.dataStore.edit {
|
||||
it[currentPushKey] = value
|
||||
if (value == null) {
|
||||
it.remove(currentPushKey)
|
||||
} else {
|
||||
it[currentPushKey] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user