Skip to content

Commit

Permalink
Merge pull request #2132 from OneSignal/fix/NotificationPermissionCon…
Browse files Browse the repository at this point in the history
…troller_methods

[fix] NotificationPermissionController fix an override method signature
  • Loading branch information
nan-li authored Jun 18, 2024
2 parents 6e65b5f + 9482a93 commit e367bd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ internal class NotificationPermissionController(
private fun registerPollingLifecycleListener() {
_applicationService.addApplicationLifecycleHandler(
object : ApplicationLifecycleHandlerBase() {
override fun onFocus() {
super.onFocus()
override fun onFocus(firedOnSubscribe: Boolean) {
super.onFocus(firedOnSubscribe)
pollingWaitInterval = _configModelStore.model.foregroundFetchNotificationPermissionInterval
pollingWaiter.wake()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class NotificationPermissionControllerTests : FunSpec({
// call onFocus to set the proper polling interval.
// This happens when registering the lifecycle handler
for (focusHandler in focusHandlerList) {
focusHandler.onFocus()
focusHandler.onFocus(false)
}

// When
Expand Down Expand Up @@ -99,7 +99,7 @@ class NotificationPermissionControllerTests : FunSpec({
// call onFocus to set the proper polling interval.
// This happens when registering the lifecycle handler
for (focusHandler in handlerList) {
focusHandler.onFocus()
focusHandler.onFocus(false)
}

// When
Expand Down Expand Up @@ -142,7 +142,7 @@ class NotificationPermissionControllerTests : FunSpec({
// call onFocus to set the proper polling interval.
// This happens when registering the lifecycle handler
for (focusHandler in handlerList) {
focusHandler.onFocus()
focusHandler.onFocus(false)
}

// When
Expand All @@ -156,7 +156,7 @@ class NotificationPermissionControllerTests : FunSpec({
delay(100)
// the app regains focus
for (handler in handlerList) {
handler.onFocus()
handler.onFocus(false)
}
delay(5)

Expand Down

0 comments on commit e367bd9

Please sign in to comment.