mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-20 03:22:31 +01:00
Cleanup Source home screen
This commit is contained in:
@@ -51,7 +51,7 @@ fun SourceHomeScreen(
|
|||||||
} else {
|
} else {
|
||||||
Box(Modifier.fillMaxSize(), Alignment.TopCenter) {
|
Box(Modifier.fillMaxSize(), Alignment.TopCenter) {
|
||||||
val state = rememberLazyListState()
|
val state = rememberLazyListState()
|
||||||
SourceCategory("all", sources, serverUrl, onSourceClicked, state)
|
SourceCategory(sources, serverUrl, onSourceClicked, state)
|
||||||
/*val sourcesByLang = sources.groupBy { it.lang.toLowerCase() }.toList()
|
/*val sourcesByLang = sources.groupBy { it.lang.toLowerCase() }.toList()
|
||||||
LazyColumn(state = state) {
|
LazyColumn(state = state) {
|
||||||
items(sourcesByLang) { (lang, sources) ->
|
items(sourcesByLang) { (lang, sources) ->
|
||||||
@@ -74,16 +74,11 @@ fun SourceHomeScreen(
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SourceCategory(
|
fun SourceCategory(
|
||||||
lang: String,
|
|
||||||
sources: List<Source>,
|
sources: List<Source>,
|
||||||
serverUrl: String,
|
serverUrl: String,
|
||||||
onSourceClicked: (Source) -> Unit,
|
onSourceClicked: (Source) -> Unit,
|
||||||
state: LazyListState
|
state: LazyListState
|
||||||
) {
|
) {
|
||||||
Column {
|
|
||||||
/*Surface(elevation = 1.dp, modifier = Modifier.fillMaxWidth()) {
|
|
||||||
Text(lang.uppercase(Locale.getDefault()), modifier = Modifier.align(Alignment.CenterHorizontally), color = MaterialTheme.colors.onBackground)
|
|
||||||
}*/
|
|
||||||
LazyVerticalGrid(GridCells.Adaptive(120.dp), state = state) {
|
LazyVerticalGrid(GridCells.Adaptive(120.dp), state = state) {
|
||||||
items(sources) { source ->
|
items(sources) { source ->
|
||||||
SourceItem(
|
SourceItem(
|
||||||
@@ -95,7 +90,6 @@ fun SourceCategory(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SourceItem(
|
fun SourceItem(
|
||||||
|
|||||||
Reference in New Issue
Block a user