Check update onResume() instead of onCreate()

This commit is contained in:
tom5079
2021-07-03 16:25:08 +09:00
parent 1efca40744
commit 1f80e36017

View File

@@ -124,7 +124,6 @@ class MainActivity :
if (Preferences["download_folder", ""].isEmpty())
DownloadLocationDialogFragment().show(supportFragmentManager, "Download Location Dialog")
checkUpdate(this)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R &&
!Preferences["download_folder_ignore_warning", false] &&
@@ -144,6 +143,12 @@ class MainActivity :
initView()
}
override fun onResume() {
super.onResume()
checkUpdate(this)
}
@OptIn(ExperimentalStdlibApi::class)
override fun onBackPressed() {
when {