Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Refresh notification settings state correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Oct 23, 2024
1 parent 8455145 commit a2e744b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ class NotificationsSettingsViewModel(private val sharedPreferences: SharedPrefer
TextSecurePreferences.setPromptedOptimizeDoze(AppDependencies.application, false)
ApplicationContext.getInstance().updatePushNotificationServices()
AppDependencies.resetNetwork(true)
// Avoid calling refresh() here to prevent updating canReceiveFcm
// while the FCM token is still being refreshed.
store.update { it.copy(preferredNotificationMethod = method) }
refresh()
}

fun setPlayServicesErrorCode(errorCode: Int?) {
Expand Down

0 comments on commit a2e744b

Please sign in to comment.