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

@@ -807,3 +807,11 @@
- Removed bottom `Back to chats` button from profile screen.
- Simplified profile layout so the editable profile form is the primary secondary section toggled by `Edit`.
- Updated `ProfileRoute` navigation contract to match the simplified screen API.
### Step 117 - Settings folders cleanup (remove back button action)
- Removed `Back to chats` button from all Settings folder pages.
- Simplified Settings navigation contract by removing unused `onBackToChats` parameter from:
- `SettingsRoute`
- `SettingsScreen`
- `SettingsFolderView`
- Updated `AppNavGraph` Settings destination call-site accordingly.

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") }
}
}