Improve API, to avoid ignoring errors
This commit is contained in:
parent
d88ef8769e
commit
a65c290dd3
18 changed files with 143 additions and 107 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue