Skip to content

Commit

Permalink
Avoid showing empty section in settings
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Singh <[email protected]>
  • Loading branch information
naveensingh committed Oct 6, 2024
1 parent f3445f9 commit 82cc2b1
Showing 1 changed file with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,30 @@ internal fun SettingsScreen(
doOnPreferenceClick = customizeColors,
)
}
SettingsHorizontalDivider()
SettingsGroup(title = {
SettingsTitleTextComponent(text = stringResource(id = R.string.general_settings))
}) {

if (isUseEnglishEnabled) {
SettingsCheckBoxComponent(
label = stringResource(id = R.string.use_english_language),
initialValue = isUseEnglishChecked,
onChange = onUseEnglishPress,
)
}
if (isTiramisuPlus()) {
SettingsPreferenceComponent(
label = stringResource(id = R.string.language),
value = displayLanguage,
doOnPreferenceClick = onSetupLanguagePress,
preferenceLabelColor = SimpleTheme.colorScheme.onSurface,
)
if (isUseEnglishEnabled || isTiramisuPlus()) {
SettingsHorizontalDivider()
SettingsGroup(title = {
SettingsTitleTextComponent(text = stringResource(id = R.string.general_settings))
}) {
if (isUseEnglishEnabled) {
SettingsCheckBoxComponent(
label = stringResource(id = R.string.use_english_language),
initialValue = isUseEnglishChecked,
onChange = onUseEnglishPress,
)
}
if (isTiramisuPlus()) {
SettingsPreferenceComponent(
label = stringResource(id = R.string.language),
value = displayLanguage,
doOnPreferenceClick = onSetupLanguagePress,
preferenceLabelColor = SimpleTheme.colorScheme.onSurface,
)
}
}
}

SettingsHorizontalDivider()
SettingsGroup(title = {
SettingsTitleTextComponent(text = stringResource(id = R.string.all_fossify_apps))
Expand Down

0 comments on commit 82cc2b1

Please sign in to comment.