Fix deprecations

This commit is contained in:
Mygod
2020-01-09 23:12:23 +08:00
parent def2f971c9
commit 15ef02143b
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ abstract class AlertDialogFragment<Arg : Parcelable, Ret : Parcelable> :
fun show(target: Fragment, requestCode: Int = 0, tag: String = javaClass.simpleName) { fun show(target: Fragment, requestCode: Int = 0, tag: String = javaClass.simpleName) {
setTargetFragment(target, requestCode) setTargetFragment(target, requestCode)
show(target.fragmentManager ?: return, tag) show(target.parentFragmentManager, tag)
} }
} }

View File

@@ -199,7 +199,7 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
SmartSnackbar.make(e).show() SmartSnackbar.make(e).show()
return false return false
} }
QRCodeDialog().withArg(qrString).show(fragmentManager ?: return false, "QRCodeDialog") QRCodeDialog().withArg(qrString).show(parentFragmentManager, "QRCodeDialog")
true true
} }
else -> false else -> false