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:
arkon 2020-12-12 16:15:18 -05:00 committed by Jobobby04
parent 972579bbec
commit bbd3e3c29c
2 changed files with 3 additions and 4 deletions

View File

@ -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>()

View File

@ -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
}
}