Merge branch 'master' into sqlcipher

This commit is contained in:
Evgeny Poberezkin
2022-09-03 20:52:26 +01:00
2 changed files with 4 additions and 8 deletions
@@ -158,7 +158,7 @@ fun SettingsLayout(
SectionSpacer() SectionSpacer()
SectionView(stringResource(R.string.settings_section_title_develop)) { SectionView(stringResource(R.string.settings_section_title_develop)) {
ChatConsoleItem(showTerminal, stopped) ChatConsoleItem(showTerminal)
SectionDivider() SectionDivider()
SettingsPreferenceItem(Icons.Outlined.Construction, stringResource(R.string.settings_developer_tools), developerTools) SettingsPreferenceItem(Icons.Outlined.Construction, stringResource(R.string.settings_developer_tools), developerTools)
SectionDivider() SectionDivider()
@@ -302,18 +302,15 @@ fun MaintainIncognitoState(chatModel: ChatModel) {
} }
} }
@Composable private fun ChatConsoleItem(showTerminal: () -> Unit, stopped: Boolean) { @Composable private fun ChatConsoleItem(showTerminal: () -> Unit) {
SectionItemView(showTerminal, disabled = stopped) { SectionItemView(showTerminal) {
Icon( Icon(
painter = painterResource(id = R.drawable.ic_outline_terminal), painter = painterResource(id = R.drawable.ic_outline_terminal),
contentDescription = stringResource(R.string.chat_console), contentDescription = stringResource(R.string.chat_console),
tint = HighOrLowlight, tint = HighOrLowlight,
) )
Spacer(Modifier.padding(horizontal = 4.dp)) Spacer(Modifier.padding(horizontal = 4.dp))
Text( Text(stringResource(R.string.chat_console))
stringResource(R.string.chat_console),
color = if (stopped) HighOrLowlight else Color.Unspecified
)
} }
} }
@@ -185,7 +185,6 @@ struct SettingsView: View {
} label: { } label: {
settingsRow("terminal") { Text("Chat console") } settingsRow("terminal") { Text("Chat console") }
} }
.disabled(chatModel.chatRunning != true)
settingsRow("gear") { settingsRow("gear") {
Toggle("Developer tools", isOn: $developerTools) Toggle("Developer tools", isOn: $developerTools)
} }