mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 02:55:09 +01:00
remove duplicate LocalSource entries in Browse
This commit is contained in:
parent
1acc2d60e0
commit
30250f2f82
@ -119,11 +119,13 @@ class SourcePresenter(
|
|||||||
val languages = preferences.enabledLanguages().get()
|
val languages = preferences.enabledLanguages().get()
|
||||||
val disabledSourceIds = preferences.disabledSources().get()
|
val disabledSourceIds = preferences.disabledSources().get()
|
||||||
|
|
||||||
|
val localSource = sourceManager.get(LocalSource.ID)
|
||||||
return sourceManager.getCatalogueSources()
|
return sourceManager.getCatalogueSources()
|
||||||
.filter { it.lang in languages }
|
.filter { it.lang in languages }
|
||||||
.filterNot { it.id.toString() in disabledSourceIds }
|
.filterNot { it.id.toString() in disabledSourceIds }
|
||||||
|
.filterNot { it.id.toString() == localSource.toString() }
|
||||||
.sortedBy { "(${it.lang}) ${it.name.lowercase()}" } +
|
.sortedBy { "(${it.lang}) ${it.name.lowercase()}" } +
|
||||||
sourceManager.get(LocalSource.ID) as LocalSource
|
localSource as LocalSource
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
Loading…
Reference in New Issue
Block a user