mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 20:19:05 +01:00
Fix language in source filter list jumping to top incorrectly
Fixes #9068
This commit is contained in:
@@ -64,7 +64,7 @@ private fun SourcesFilterContent(
|
||||
state.items.forEach { (language, sources) ->
|
||||
val enabled = language in state.enabledLanguages
|
||||
item(
|
||||
key = language.hashCode(),
|
||||
key = language,
|
||||
contentType = "source-filter-header",
|
||||
) {
|
||||
SourcesFilterHeader(
|
||||
@@ -74,18 +74,19 @@ private fun SourcesFilterContent(
|
||||
onClickItem = onClickLanguage,
|
||||
)
|
||||
}
|
||||
if (!enabled) return@forEach
|
||||
items(
|
||||
items = sources,
|
||||
key = { "source-filter-${it.key()}" },
|
||||
contentType = { "source-filter-item" },
|
||||
) { source ->
|
||||
SourcesFilterItem(
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
source = source,
|
||||
enabled = "${source.id}" !in state.disabledSources,
|
||||
onClickItem = onClickSource,
|
||||
)
|
||||
if (enabled) {
|
||||
items(
|
||||
items = sources,
|
||||
key = { "source-filter-${it.key()}" },
|
||||
contentType = { "source-filter-item" },
|
||||
) { source ->
|
||||
SourcesFilterItem(
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
source = source,
|
||||
enabled = "${source.id}" !in state.disabledSources,
|
||||
onClickItem = onClickSource,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user