mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-26 00:31:49 +01:00
remove unfinished code for now
This commit is contained in:
parent
63783984c6
commit
5313d91bf2
@ -5,7 +5,7 @@ import eu.kanade.tachiyomi.source.model.FilterList
|
|||||||
|
|
||||||
fun sourceFilters(sourceId: Long) {
|
fun sourceFilters(sourceId: Long) {
|
||||||
val source = getHttpSource(sourceId)
|
val source = getHttpSource(sourceId)
|
||||||
source.getFilterList().toItems()
|
//source.getFilterList().toItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun sourceSearch(sourceId: Long, searchTerm: String) {
|
fun sourceSearch(sourceId: Long, searchTerm: String) {
|
||||||
@ -22,38 +22,38 @@ data class FilterWrapper(
|
|||||||
val filter: Any
|
val filter: Any
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun FilterList.toItems(): List<FilterWrapper> {
|
//private fun FilterList.toItems(): List<FilterWrapper> {
|
||||||
return mapNotNull { filter ->
|
// return mapNotNull { filter ->
|
||||||
when (filter) {
|
// when (filter) {
|
||||||
is Filter.Header -> FilterWrapper("Header",filter)
|
// is Filter.Header -> FilterWrapper("Header",filter)
|
||||||
is Filter.Separator -> FilterWrapper("Separator",filter)
|
// is Filter.Separator -> FilterWrapper("Separator",filter)
|
||||||
is Filter.CheckBox -> FilterWrapper("CheckBox",filter)
|
// is Filter.CheckBox -> FilterWrapper("CheckBox",filter)
|
||||||
is Filter.TriState -> FilterWrapper("TriState",filter)
|
// is Filter.TriState -> FilterWrapper("TriState",filter)
|
||||||
is Filter.Text -> FilterWrapper("Text",filter)
|
// is Filter.Text -> FilterWrapper("Text",filter)
|
||||||
is Filter.Select<*> -> FilterWrapper("Select",filter)
|
// is Filter.Select<*> -> FilterWrapper("Select",filter)
|
||||||
is Filter.Group<*> -> {
|
// is Filter.Group<*> -> {
|
||||||
val group = GroupItem(filter)
|
// val group = GroupItem(filter)
|
||||||
val subItems = filter.state.mapNotNull {
|
// val subItems = filter.state.mapNotNull {
|
||||||
when (it) {
|
// when (it) {
|
||||||
is Filter.CheckBox -> FilterWrapper("CheckBox",filter)
|
// is Filter.CheckBox -> FilterWrapper("CheckBox",filter)
|
||||||
is Filter.TriState -> FilterWrapper("TriState",filter)
|
// is Filter.TriState -> FilterWrapper("TriState",filter)
|
||||||
is Filter.Text -> FilterWrapper("Text",filter)
|
// is Filter.Text -> FilterWrapper("Text",filter)
|
||||||
is Filter.Select<*> -> FilterWrapper("Select",filter)
|
// is Filter.Select<*> -> FilterWrapper("Select",filter)
|
||||||
else -> null
|
// else -> null
|
||||||
} as? ISectionable<*, *>
|
// } as? ISectionable<*, *>
|
||||||
}
|
// }
|
||||||
subItems.forEach { it.header = group }
|
// subItems.forEach { it.header = group }
|
||||||
group.subItems = subItems
|
// group.subItems = subItems
|
||||||
group
|
// group
|
||||||
}
|
// }
|
||||||
is Filter.Sort -> {
|
// is Filter.Sort -> {
|
||||||
val group = SortGroup(filter)
|
// val group = SortGroup(filter)
|
||||||
val subItems = filter.values.map {
|
// val subItems = filter.values.map {
|
||||||
SortItem(it, group)
|
// SortItem(it, group)
|
||||||
}
|
// }
|
||||||
group.subItems = subItems
|
// group.subItems = subItems
|
||||||
group
|
// group
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
Loading…
Reference in New Issue
Block a user