From 6c0761186b309ee9c07214fc534f835fe60af7b3 Mon Sep 17 00:00:00 2001 From: lisonge Date: Sun, 8 Oct 2023 20:20:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E4=BB=BB=E5=8A=A1=E6=97=A7=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/li/songe/gkd/MainActivity.kt | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/src/main/java/li/songe/gkd/MainActivity.kt b/app/src/main/java/li/songe/gkd/MainActivity.kt index 6dd4416..4f20cc0 100644 --- a/app/src/main/java/li/songe/gkd/MainActivity.kt +++ b/app/src/main/java/li/songe/gkd/MainActivity.kt @@ -1,12 +1,10 @@ package li.songe.gkd -import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Modifier import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.navigation.compose.rememberNavController -import com.blankj.utilcode.util.LogUtils import com.dylanc.activityresult.launcher.PickContentLauncher import com.dylanc.activityresult.launcher.RequestPermissionLauncher import com.dylanc.activityresult.launcher.StartActivityLauncher @@ -21,7 +19,6 @@ import li.songe.gkd.util.LocalNavController import li.songe.gkd.util.LocalPickContentLauncher import li.songe.gkd.util.LocalRequestPermissionLauncher import li.songe.gkd.util.UpgradeDialog -import li.songe.gkd.util.storeFlow @AndroidEntryPoint class MainActivity : CompositionActivity({ @@ -32,15 +29,6 @@ class MainActivity : CompositionActivity({ val pickContentLauncher = PickContentLauncher(this) val requestPermissionLauncher = RequestPermissionLauncher(this) - onFinish { fs -> - if (storeFlow.value.excludeFromRecents) { - finishAndRemoveTask() // 会让miui桌面回退动画失效 - LogUtils.d("finishAndRemoveTask") - } else { - fs() - } - } - // https://juejin.cn/post/7169147194400833572 // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { // window.attributes.layoutInDisplayCutoutMode = @@ -50,13 +38,6 @@ class MainActivity : CompositionActivity({ setContent { UpgradeDialog() val navController = rememberNavController() - BackHandler { - if (navController.currentBackStack.value.size <= 2) { - finish() - } else { - navController.popBackStack() - } - } AppTheme(false) { CompositionLocalProvider( LocalLauncher provides launcher,