From d046600dc2a45f07e8800a32e497844c337c3c3a Mon Sep 17 00:00:00 2001 From: Gideon Okuro Date: Tue, 9 Jul 2024 21:12:43 +0300 Subject: [PATCH] networks: smoother wifi access (fixes #1815) (#2082) Co-authored-by: dogi --- .../io/treehouses/remote/ui/network/NetworkFragment.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/io/treehouses/remote/ui/network/NetworkFragment.kt b/app/src/main/kotlin/io/treehouses/remote/ui/network/NetworkFragment.kt index 4c209dfe2..8c2f9d320 100644 --- a/app/src/main/kotlin/io/treehouses/remote/ui/network/NetworkFragment.kt +++ b/app/src/main/kotlin/io/treehouses/remote/ui/network/NetworkFragment.kt @@ -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: + } } } \ No newline at end of file