Skip to content

Commit

Permalink
update an override method signature
Browse files Browse the repository at this point in the history
* This code was originally created in #2112
* A parallel PR made a change to the method signature of `onFocus`
  • Loading branch information
nan-li committed Jun 18, 2024
1 parent 6e65b5f commit 9482a93
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 9482a93

Please sign in to comment.