Skip to content

Commit

Permalink
Merge pull request #235 from Infomaniak/hide-theme-api-below-29
Browse files Browse the repository at this point in the history
feat: Hide theme in settings if device is running on API below 29
  • Loading branch information
tevincent authored Dec 5, 2024
2 parents 22122e6 + 617aea8 commit f09ad10
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
import com.infomaniak.swisstransfer.ui.utils.GetSetCallbacks
import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows
import android.os.Build

@Composable
fun SettingsScreen(
Expand All @@ -73,14 +74,18 @@ fun SettingsScreen(
)

SettingTitle(R.string.settingsCategoryGeneral)
SettingItem(
titleRes = R.string.settingsOptionTheme,
isSelected = { selectedSetting == THEME },
icon = AppIcons.PaintbrushPalette,
description = theme.get().getString(),
endIcon = CHEVRON,
onClick = { onItemClick(THEME) },
)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
SettingItem(
titleRes = R.string.settingsOptionTheme,
isSelected = { selectedSetting == THEME },
icon = AppIcons.PaintbrushPalette,
description = theme.get().getString(),
endIcon = CHEVRON,
onClick = { onItemClick(THEME) },
)
}

SettingItem(
titleRes = R.string.settingsOptionNotifications,
isSelected = { false },
Expand Down

0 comments on commit f09ad10

Please sign in to comment.