Remove source overwrite logic since built-in sources no longer exist
(cherry picked from commit 1a439ecece5e2963a5e6ba9761adad90f8c0bb29) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt
This commit is contained in:
parent
972579bbec
commit
bbd3e3c29c
@ -142,8 +142,7 @@ class ExtensionManager(
|
||||
.map { it.extension }
|
||||
installedExtensions
|
||||
.flatMap { it.sources }
|
||||
// overwrite is needed until the bundled sources are removed
|
||||
.forEach { sourceManager.registerSource(it, true) }
|
||||
.forEach { sourceManager.registerSource(it) }
|
||||
|
||||
untrustedExtensions = extensions
|
||||
.filterIsInstance<LoadResult.Untrusted>()
|
||||
|
@ -103,7 +103,7 @@ open class SourceManager(private val context: Context) {
|
||||
}
|
||||
// SY <--
|
||||
|
||||
internal fun registerSource(source: Source, overwrite: Boolean = false) {
|
||||
internal fun registerSource(source: Source) {
|
||||
// EXH -->
|
||||
val sourceQName = source::class.qualifiedName
|
||||
val factories = DELEGATED_SOURCES.entries.filter { it.value.factory }.map { it.value.originalSourceQualifiedClassName }
|
||||
@ -130,7 +130,7 @@ open class SourceManager(private val context: Context) {
|
||||
}
|
||||
// EXH <--
|
||||
|
||||
if (overwrite || !sourcesMap.containsKey(source.id)) {
|
||||
if (!sourcesMap.containsKey(source.id)) {
|
||||
sourcesMap[source.id] = newSource
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user