Skip to content

Commit

Permalink
Set on redirect listener when delegate is available
Browse files Browse the repository at this point in the history
In some edge cases when setOnRedirectListener would be called after creation of a delegate
it would not actually set the callback. Now it will.
  • Loading branch information
OscarSpruit committed Apr 25, 2024
1 parent d4962cd commit c7339aa
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -196,6 +196,11 @@ internal class DefaultGenericActionDelegate(
}

override fun setOnRedirectListener(listener: () -> Unit) {
_delegate?.let { delegate ->
if (delegate is RedirectableDelegate) {
delegate.setOnRedirectListener(listener)
}
}
onRedirectListener = listener
}

Expand Down

0 comments on commit c7339aa

Please sign in to comment.