Skip to content

Commit

Permalink
ensure that WifiBottomSheet is correctly added to the FragmentManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 committed Jul 8, 2024
1 parent 498db65 commit b367849
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ open class NetworkFragment : BaseFragment(), View.OnClickListener, FragmentDialo
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
Toast.makeText(context, "Wifi scan requires at least android API 23", Toast.LENGTH_LONG).show()
} else {
val fragmentManager = bottomSheetDialogFragment.parentFragmentManager
val dialogFrag = WifiDialogFragment.newInstance()
dialogFrag.setTargetFragment(bottomSheetDialogFragment, Constants.REQUEST_DIALOG_WIFI)
dialogFrag.show(bottomSheetDialogFragment.requireActivity().supportFragmentManager.beginTransaction(), "wifiDialog")
dialogFrag.show(fragmentManager, "wifiDialog")
}
} // Next Version:
}
}
}

0 comments on commit b367849

Please sign in to comment.