android: remove back-to-chats from settings folders
Some checks failed
Android CI / android (push) Has started running
Android Release / release (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
Codex
2026-03-10 00:33:10 +03:00
parent eae6a2a90f
commit 158126555c
3 changed files with 8 additions and 8 deletions

View File

@@ -247,7 +247,6 @@ fun MessengerNavHost(
composable(route = Routes.Settings) {
SettingsRoute(
onBackToChats = { navController.navigate(Routes.Chats) },
onOpenProfile = { navController.navigate(Routes.Profile) },
onSwitchAccount = {
viewModel.recheckSession()

View File

@@ -88,7 +88,6 @@ private enum class SettingsFolder(val title: String) {
@Composable
fun SettingsRoute(
onBackToChats: () -> Unit,
onOpenProfile: () -> Unit,
onSwitchAccount: () -> Unit,
onLogout: () -> Unit,
@@ -96,7 +95,6 @@ fun SettingsRoute(
viewModel: AccountViewModel = hiltViewModel(),
) {
SettingsScreen(
onBackToChats = onBackToChats,
onOpenProfile = onOpenProfile,
onSwitchAccount = onSwitchAccount,
onLogout = onLogout,
@@ -107,7 +105,6 @@ fun SettingsRoute(
@Composable
fun SettingsScreen(
onBackToChats: () -> Unit,
onOpenProfile: () -> Unit,
onSwitchAccount: () -> Unit,
onLogout: () -> Unit,
@@ -151,7 +148,6 @@ fun SettingsScreen(
state = state,
folder = folder ?: SettingsFolder.Account,
onBack = { folder = null },
onBackToChats = onBackToChats,
onSwitchAccount = onSwitchAccount,
onLogout = onLogout,
onOpenProfile = onOpenProfile,
@@ -213,7 +209,6 @@ private fun SettingsFolderView(
state: AccountUiState,
folder: SettingsFolder,
onBack: () -> Unit,
onBackToChats: () -> Unit,
onSwitchAccount: () -> Unit,
onLogout: () -> Unit,
onOpenProfile: () -> Unit,
@@ -252,8 +247,6 @@ private fun SettingsFolderView(
if (!state.message.isNullOrBlank()) Text(state.message.orEmpty(), color = MaterialTheme.colorScheme.primary)
if (!state.errorMessage.isNullOrBlank()) Text(state.errorMessage.orEmpty(), color = MaterialTheme.colorScheme.error)
OutlinedButton(onClick = onBackToChats, modifier = Modifier.fillMaxWidth()) { Text("Back to chats") }
}
}