diff --git a/tasks-app-shared/src/commonMain/kotlin/net/opatry/tasks/app/ui/TasksApp.kt b/tasks-app-shared/src/commonMain/kotlin/net/opatry/tasks/app/ui/TasksApp.kt index c8f823c3..075228b0 100644 --- a/tasks-app-shared/src/commonMain/kotlin/net/opatry/tasks/app/ui/TasksApp.kt +++ b/tasks-app-shared/src/commonMain/kotlin/net/opatry/tasks/app/ui/TasksApp.kt @@ -51,6 +51,7 @@ import androidx.compose.ui.platform.LocalWindowInfo import androidx.compose.ui.unit.dp import net.opatry.tasks.app.ui.component.EditTextDialog import net.opatry.tasks.app.ui.component.MissingScreen +import net.opatry.tasks.app.ui.component.MyBackHandler import net.opatry.tasks.app.ui.component.ProfileIcon import net.opatry.tasks.app.ui.screen.AboutApp import net.opatry.tasks.app.ui.screen.AboutScreen @@ -96,6 +97,10 @@ fun TasksApp(aboutApp: AboutApp, userViewModel: UserViewModel, tasksViewModel: T var newTaskListDefaultTitle by remember { mutableStateOf("") } var showNewTaskListDialog by remember { mutableStateOf(false) } + MyBackHandler({ selectedScreen != AppTasksScreen.Tasks }) { + selectedScreen = AppTasksScreen.Tasks + } + NavigationSuiteScaffold(navigationSuiteItems = { AppTasksScreen.entries.forEach { screen -> // hide unsupported screens for now