Skip to content

Commit

Permalink
fix: fix crash in AppCompatibilityFragment if activity detached
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Feb 8, 2023
1 parent 94352f8 commit 8c3f006
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AppCompatibilityFragment : Fragment() {
}

Timer("Close", false).schedule(300L) {
requireActivity().finish()
activity?.finish()
if(internalCall)
startActivity(Intent(requireContext(), MainActivity::class.java))
}
Expand All @@ -111,7 +111,7 @@ class AppCompatibilityFragment : Fragment() {
}

Timer("Close", false).schedule(300L) {
requireActivity().finish()
activity?.finish()
if(internalCall)
startActivity(Intent(requireContext(), MainActivity::class.java))
}
Expand Down

0 comments on commit 8c3f006

Please sign in to comment.