Skip to content

Commit

Permalink
Refactor DownloadLimitOption
Browse files Browse the repository at this point in the history
  • Loading branch information
sirambd authored and KevinBoulongne committed Sep 4, 2024
1 parent 1afbb59 commit e6dd8ad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fun SettingsDownloadsLimitScreen(
SettingTitle(titleRes = R.string.settingsDownloadsLimitTitle)

var selectedItem by rememberSaveable { mutableIntStateOf(downloadLimit.ordinal) }
SingleSelectOptions(DownloadsLimitOption.entries, { selectedItem }, { position ->
SingleSelectOptions(DownloadLimitOption.entries, { selectedItem }, { position ->
selectedItem = position
val selectedDownloadLimit = DownloadLimit.entries[position]
onDownloadLimitChange(selectedDownloadLimit)
Expand All @@ -67,7 +67,7 @@ fun SettingsDownloadsLimitScreen(
}
}

enum class DownloadsLimitOption(
enum class DownloadLimitOption(
override val title: @Composable () -> String,
override val imageVector: ImageVector? = null,
override val imageVectorResId: Int? = null,
Expand Down

0 comments on commit e6dd8ad

Please sign in to comment.