Minor cleanup
This commit is contained in:
+2
-2
@@ -225,7 +225,7 @@ object SettingsSecurityScreen : SearchableSettings {
|
||||
onDaysSelected: (Int) -> Unit,
|
||||
) {
|
||||
val selected = remember(initialSelection) {
|
||||
DayOption.values().filter { it.day and initialSelection == it.day }
|
||||
DayOption.entries.filter { it.day and initialSelection == it.day }
|
||||
.toMutableStateList()
|
||||
}
|
||||
AlertDialog(
|
||||
@@ -233,7 +233,7 @@ object SettingsSecurityScreen : SearchableSettings {
|
||||
title = { Text(text = stringResource(SYMR.strings.biometric_lock_days)) },
|
||||
text = {
|
||||
LazyColumn {
|
||||
DayOption.values().forEach { day ->
|
||||
DayOption.entries.forEach { day ->
|
||||
item {
|
||||
val isSelected = selected.contains(day)
|
||||
val onSelectionChanged = {
|
||||
|
||||
@@ -862,7 +862,7 @@ class LibraryScreenModel(
|
||||
} else {
|
||||
categoryName
|
||||
}
|
||||
LibraryGroup.BY_TRACK_STATUS -> TrackStatus.values()
|
||||
LibraryGroup.BY_TRACK_STATUS -> TrackStatus.entries
|
||||
.find { it.int.toLong() == category?.id }
|
||||
.let { it ?: TrackStatus.OTHER }
|
||||
.let { context.stringResource(it.res) }
|
||||
@@ -1171,11 +1171,11 @@ class LibraryScreenModel(
|
||||
}.mapKeys { (id) ->
|
||||
Category(
|
||||
id = id.toLong(),
|
||||
name = TrackStatus.values()
|
||||
name = TrackStatus.entries
|
||||
.find { it.int == id }
|
||||
.let { it ?: TrackStatus.OTHER }
|
||||
.let { context.stringResource(it.res) },
|
||||
order = TrackStatus.values().indexOfFirst {
|
||||
order = TrackStatus.entries.indexOfFirst {
|
||||
it.int == id
|
||||
}.takeUnless { it == -1 }?.toLong() ?: TrackStatus.OTHER.ordinal.toLong(),
|
||||
flags = 0,
|
||||
|
||||
Reference in New Issue
Block a user