fix: regression in which "log out" is not error coloured

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2024-01-08 01:27:15 +01:00
parent 017b21b8ad
commit 94034c8cfc
1 changed files with 18 additions and 16 deletions

View File

@ -278,31 +278,33 @@ fun SettingsScreen(
} }
) )
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.error) { ListItem(
ListItem( headlineContent = {
headlineContent = { CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.error) {
Text( Text(
text = stringResource(id = R.string.logout) text = stringResource(id = R.string.logout)
) )
}, }
leadingContent = { },
leadingContent = {
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.error) {
Icon( Icon(
imageVector = Icons.Default.Close, imageVector = Icons.Default.Close,
contentDescription = stringResource(id = R.string.logout), contentDescription = stringResource(id = R.string.logout),
) )
}, }
modifier = Modifier },
.testTag("settings_view_logout") modifier = Modifier
.clickable { .testTag("settings_view_logout")
viewModel.logout() .clickable {
navController.navigate("login/greeting") { viewModel.logout()
popUpTo("chat") { navController.navigate("login/greeting") {
inclusive = true popUpTo("chat") {
} inclusive = true
} }
} }
) }
} )
} }
} }
} }