Updated on 2026-08-14
This commit is contained in:
parent
3580350769
commit
8aba7b07d1
49 changed files with 172 additions and 134 deletions
|
|
@ -67,10 +67,12 @@ class DefaultNotificationsRepository @Inject constructor(
|
|||
}
|
||||
|
||||
override suspend fun setNotificationsWasEnabledAutomatically(userWalletId: String) {
|
||||
appPreferencesStore.editData {
|
||||
it.setObjectMap(
|
||||
appPreferencesStore.editData { preferences ->
|
||||
preferences.setObjectMap(
|
||||
key = PreferencesKeys.NOTIFICATIONS_AUTOMATICALLY_ENABLED_STATES_KEY,
|
||||
value = it.getObjectMap<Boolean>(PreferencesKeys.NOTIFICATIONS_AUTOMATICALLY_ENABLED_STATES_KEY)
|
||||
value = preferences.getObjectMap<Boolean>(
|
||||
PreferencesKeys.NOTIFICATIONS_AUTOMATICALLY_ENABLED_STATES_KEY,
|
||||
)
|
||||
.plus(userWalletId to true),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ internal class DefaultPushNotificationsRepository @Inject constructor(
|
|||
) : PushNotificationsRepository {
|
||||
|
||||
override suspend fun createApplicationId(pushToken: String?): ApplicationId = withContext(dispatchers.io) {
|
||||
tangemTechApi.createApplicationId(
|
||||
val appId = tangemTechApi.createApplicationId(
|
||||
NotificationApplicationCreateBody(
|
||||
platform = appInfoProvider.platform.lowercase(),
|
||||
device = appInfoProvider.device,
|
||||
|
|
@ -33,7 +33,9 @@ internal class DefaultPushNotificationsRepository @Inject constructor(
|
|||
version = appInfoProvider.appVersion,
|
||||
pushToken = pushToken,
|
||||
),
|
||||
).getOrThrow().appId.let(::ApplicationId)
|
||||
).getOrThrow().appId
|
||||
|
||||
ApplicationId(appId)
|
||||
}
|
||||
|
||||
override suspend fun saveApplicationId(appId: ApplicationId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue