Skip to content

Commit

Permalink
Start with polling interval as the background value
Browse files Browse the repository at this point in the history
This protects init in the background
onFocus is called immediately if the app is in focus and wakes so we start polling correctly
  • Loading branch information
emawby committed Jun 14, 2024
1 parent 8feeda8 commit 7104d3a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal class NotificationPermissionController(
init {
this.enabled = notificationsEnabled()
_requestPermission.registerAsCallback(PERMISSION_TYPE, this)
pollingWaitInterval = _configModelStore.model.foregroundFetchNotificationPermissionInterval
pollingWaitInterval = _configModelStore.model.backgroundFetchNotificationPermissionInterval
registerPollingLifecycleListener()
coroutineScope.launch {
pollForPermission()
Expand Down

0 comments on commit 7104d3a

Please sign in to comment.