Skip to content

Commit

Permalink
add lifecycle owner to OnBackPressedCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnohe committed Sep 27, 2023
1 parent 0dfc962 commit 22a0800
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class PBTransition : Fragment() {
callback.isEnabled = true
}

this.requireActivity().onBackPressedDispatcher.addCallback(callback)
this.requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner, callback)

binding.apply {
longText.movementMethod = ScrollingMovementMethod();
Expand Down

0 comments on commit 22a0800

Please sign in to comment.