From c457fd60dcc8d15f75d24648c0dca2578342a86e Mon Sep 17 00:00:00 2001 From: easyhz Date: Tue, 13 Aug 2024 02:59:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EB=B0=B1=EC=8A=A4=ED=83=9D=20=EC=8C=93=EC=9D=B4?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=EC=88=98=EC=A0=95=20#60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/easyhz/noffice/navigation/NavController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/easyhz/noffice/navigation/NavController.kt b/app/src/main/java/com/easyhz/noffice/navigation/NavController.kt index 36b63d60..f621eec1 100644 --- a/app/src/main/java/com/easyhz/noffice/navigation/NavController.kt +++ b/app/src/main/java/com/easyhz/noffice/navigation/NavController.kt @@ -4,7 +4,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.util.trace import androidx.navigation.NavDestination -import androidx.navigation.NavGraph.Companion.findStartDestination import androidx.navigation.NavHostController import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController @@ -18,7 +17,7 @@ import com.easyhz.noffice.navigation.util.BottomMenuTabs @Composable internal fun rememberNofficeNavController(navController: NavHostController = rememberNavController()) = - remember(navController) { NofficeNavController(navController = navController) } + remember { NofficeNavController(navController = navController) } internal class NofficeNavController( val navController: NavHostController @@ -49,8 +48,9 @@ internal class NofficeNavController( if (route.qualifierName == navController.currentDestination?.route) return trace("Navigation: ${route.name}") { val navOptions = navOptions { - popUpTo(navController.graph.findStartDestination().id) { + popUpTo(navController.graph.id) { saveState = true + inclusive = true } launchSingleTop = true restoreState = true