Add Compose lint checks

Still need to address most of them though.

(cherry picked from commit cb67f1de526e6120db363f67035966f365467912)

# Conflicts:
#	presentation-core/src/main/java/tachiyomi/presentation/core/components/CollapsibleBox.kt
This commit is contained in:
arkon
2023-11-11 18:13:44 -05:00
committed by Jobobby04
parent c058c23c86
commit 9ab01ec20c
21 changed files with 53 additions and 25 deletions
@@ -80,8 +80,8 @@ fun SetIntervalDialog(
}
}
WheelTextPicker(
size = size,
items = items,
size = size,
startIndex = selectedInterval,
onSelectionChanged = { selectedInterval = it },
)
@@ -102,9 +102,9 @@ fun TrackChapterSelector(
title = stringResource(R.string.chapters),
content = {
WheelNumberPicker(
items = range.toList(),
modifier = Modifier.align(Alignment.Center),
startIndex = selection,
items = range.toList(),
onSelectionChanged = { onSelectionChange(it) },
)
},
@@ -125,9 +125,9 @@ fun TrackScoreSelector(
title = stringResource(R.string.score),
content = {
WheelTextPicker(
items = selections,
modifier = Modifier.align(Alignment.Center),
startIndex = selections.indexOf(selection).takeIf { it > 0 } ?: (selections.size / 2),
items = selections,
onSelectionChanged = { onSelectionChange(selections[it]) },
)
},