Skip to content

Commit

Permalink
have background polling interval set to 1 day to effectively pause it
Browse files Browse the repository at this point in the history
  • Loading branch information
emawby committed Jun 13, 2024
1 parent 3822030 commit 5c28104
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class ConfigModel : Model() {
* The number of milliseconds between fetching the current notification permission value when the app is out of focus
*/
var backgroundFetchNotificationPermissionInterval: Long
get() = getLongProperty(::backgroundFetchNotificationPermissionInterval.name) { 1_800_000 }
get() = getLongProperty(::backgroundFetchNotificationPermissionInterval.name) { 86_400_000 }
set(value) {
setLongProperty(::backgroundFetchNotificationPermissionInterval.name, value)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ internal class NotificationPermissionController(

override fun onUnfocused() {
super.onUnfocused()
// Changing the polling interval to 1 day to effectively pause polling
pollingWaitInterval = _configModelStore.model.backgroundFetchNotificationPermissionInterval
}
},
Expand Down

0 comments on commit 5c28104

Please sign in to comment.