From aad0c4d7f85741377e60a8d66563782e9c3d44a9 Mon Sep 17 00:00:00 2001
From: callebtc <93376500+callebtc@users.noreply.github.com>
Date: Sat, 1 Aug 2026 21:17:30 +0200
Subject: [PATCH] feat(settings): combine theme and chat style into one card
System/Light/Dark and the chat style picker now share the single Theme
card in About -> Settings: theme chips on the first row, chat style
chips on the second, ordered Bubbles then Matrix. Bubbles remains the
default for fresh installs.
---
.../java/com/bitchat/android/ui/AboutSheet.kt | 95 ++++++++-----------
app/src/main/res/values/strings.xml | 1 -
2 files changed, 42 insertions(+), 54 deletions(-)
diff --git a/app/src/main/java/com/bitchat/android/ui/AboutSheet.kt b/app/src/main/java/com/bitchat/android/ui/AboutSheet.kt
index d4368ec8..7b5fed3a 100644
--- a/app/src/main/java/com/bitchat/android/ui/AboutSheet.kt
+++ b/app/src/main/java/com/bitchat/android/ui/AboutSheet.kt
@@ -382,45 +382,6 @@ fun AboutSheet(
Column {
AboutSectionLabel(text = stringResource(R.string.about_section_theme))
val themePref by com.bitchat.android.ui.theme.ThemePreferenceManager.themeFlow.collectAsState()
- Surface(
- modifier = Modifier
- .fillMaxWidth()
- .padding(horizontal = AboutHorizontalPadding),
- color = colorScheme.surface,
- shape = AboutCardShape
- ) {
- Row(
- modifier = Modifier
- .fillMaxWidth()
- .padding(12.dp),
- horizontalArrangement = Arrangement.spacedBy(8.dp)
- ) {
- ThemeChip(
- label = stringResource(R.string.about_system),
- selected = themePref.isSystem,
- onClick = { com.bitchat.android.ui.theme.ThemePreferenceManager.set(context, com.bitchat.android.ui.theme.ThemePreference.System) },
- modifier = Modifier.weight(1f)
- )
- ThemeChip(
- label = stringResource(R.string.about_light),
- selected = themePref.isLight,
- onClick = { com.bitchat.android.ui.theme.ThemePreferenceManager.set(context, com.bitchat.android.ui.theme.ThemePreference.Light) },
- modifier = Modifier.weight(1f)
- )
- ThemeChip(
- label = stringResource(R.string.about_dark),
- selected = themePref.isDark,
- onClick = { com.bitchat.android.ui.theme.ThemePreferenceManager.set(context, com.bitchat.android.ui.theme.ThemePreference.Dark) },
- modifier = Modifier.weight(1f)
- )
- }
- }
- }
- }
-
- item(key = "chat_style") {
- Column {
- AboutSectionLabel(text = stringResource(R.string.about_section_chat_style))
val chatUiMode by com.bitchat.android.ui.theme.ChatUiModeManager.modeFlow.collectAsState()
Surface(
modifier = Modifier
@@ -429,24 +390,52 @@ fun AboutSheet(
color = colorScheme.surface,
shape = AboutCardShape
) {
- Row(
+ Column(
modifier = Modifier
.fillMaxWidth()
.padding(12.dp),
- horizontalArrangement = Arrangement.spacedBy(8.dp)
+ verticalArrangement = Arrangement.spacedBy(8.dp)
) {
- ThemeChip(
- label = stringResource(R.string.chat_ui_matrix),
- selected = chatUiMode.isMatrix,
- onClick = { com.bitchat.android.ui.theme.ChatUiModeManager.set(context, com.bitchat.android.ui.theme.ChatUiMode.Matrix) },
- modifier = Modifier.weight(1f)
- )
- ThemeChip(
- label = stringResource(R.string.chat_ui_bubbles),
- selected = chatUiMode.isBubbles,
- onClick = { com.bitchat.android.ui.theme.ChatUiModeManager.set(context, com.bitchat.android.ui.theme.ChatUiMode.Bubbles) },
- modifier = Modifier.weight(1f)
- )
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.spacedBy(8.dp)
+ ) {
+ ThemeChip(
+ label = stringResource(R.string.about_system),
+ selected = themePref.isSystem,
+ onClick = { com.bitchat.android.ui.theme.ThemePreferenceManager.set(context, com.bitchat.android.ui.theme.ThemePreference.System) },
+ modifier = Modifier.weight(1f)
+ )
+ ThemeChip(
+ label = stringResource(R.string.about_light),
+ selected = themePref.isLight,
+ onClick = { com.bitchat.android.ui.theme.ThemePreferenceManager.set(context, com.bitchat.android.ui.theme.ThemePreference.Light) },
+ modifier = Modifier.weight(1f)
+ )
+ ThemeChip(
+ label = stringResource(R.string.about_dark),
+ selected = themePref.isDark,
+ onClick = { com.bitchat.android.ui.theme.ThemePreferenceManager.set(context, com.bitchat.android.ui.theme.ThemePreference.Dark) },
+ modifier = Modifier.weight(1f)
+ )
+ }
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.spacedBy(8.dp)
+ ) {
+ ThemeChip(
+ label = stringResource(R.string.chat_ui_bubbles),
+ selected = chatUiMode.isBubbles,
+ onClick = { com.bitchat.android.ui.theme.ChatUiModeManager.set(context, com.bitchat.android.ui.theme.ChatUiMode.Bubbles) },
+ modifier = Modifier.weight(1f)
+ )
+ ThemeChip(
+ label = stringResource(R.string.chat_ui_matrix),
+ selected = chatUiMode.isMatrix,
+ onClick = { com.bitchat.android.ui.theme.ChatUiModeManager.set(context, com.bitchat.android.ui.theme.ChatUiMode.Matrix) },
+ modifier = Modifier.weight(1f)
+ )
+ }
}
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1c20d534..a73b5bbb 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -171,7 +171,6 @@
About
Theme
- Chat style
Settings