diff --git a/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt b/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt index c59783d53..72a2f980b 100644 --- a/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt +++ b/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt @@ -24,8 +24,7 @@ class QrCodeActivity : BaseActivity(), OnScanResul override fun onActivityCreated(savedInstanceState: Bundle?) { val fTag = "qrCodeFragment" - var qrCodeFragment = supportFragmentManager.findFragmentByTag(fTag) - if (qrCodeFragment == null) qrCodeFragment = QrCodeFragment() + val qrCodeFragment = QrCodeFragment() supportFragmentManager.beginTransaction() .replace(R.id.fl_content, qrCodeFragment, fTag) .commit()