Fix a typo that likely goes back all the way to EH
This commit is contained in:
parent
4b57e33f2d
commit
bf209896ed
@ -81,7 +81,7 @@ open class SourceManager(private val context: Context) {
|
||||
}
|
||||
|
||||
fun getDelegatedCatalogueSources() = sourcesMap.values.filterIsInstance<EnhancedHttpSource>().mapNotNull { enhancedHttpSource ->
|
||||
enhancedHttpSource.enchancedSource as? DelegatedHttpSource
|
||||
enhancedHttpSource.enhancedSource as? DelegatedHttpSource
|
||||
}
|
||||
// SY <--
|
||||
|
||||
@ -101,7 +101,7 @@ open class SourceManager(private val context: Context) {
|
||||
source,
|
||||
delegate.newSourceClass.constructors.find { it.parameters.size == 1 }!!.call(source)
|
||||
)
|
||||
val map = listOf(DelegatedSource(enhancedSource.originalSource.name, enhancedSource.originalSource.id, enhancedSource.originalSource::class.qualifiedName ?: delegate.originalSourceQualifiedClassName, (enhancedSource.enchancedSource as DelegatedHttpSource)::class, delegate.factory)).associateBy { it.originalSourceQualifiedClassName }
|
||||
val map = listOf(DelegatedSource(enhancedSource.originalSource.name, enhancedSource.originalSource.id, enhancedSource.originalSource::class.qualifiedName ?: delegate.originalSourceQualifiedClassName, (enhancedSource.enhancedSource as DelegatedHttpSource)::class, delegate.factory)).associateBy { it.originalSourceQualifiedClassName }
|
||||
currentDelegatedSources.plusAssign(map)
|
||||
enhancedSource
|
||||
} else source
|
||||
|
@ -80,7 +80,7 @@ class SourcePreferencesController(bundle: Bundle? = null) :
|
||||
try {
|
||||
// SY -->
|
||||
if (source is EnhancedHttpSource) {
|
||||
if (source.enchancedSource is ConfigurableSource) {
|
||||
if (source.enhancedSource is ConfigurableSource) {
|
||||
addPreferencesForSource(screen, source.source())
|
||||
} else {
|
||||
addPreferencesForSource(screen, source.originalSource)
|
||||
|
@ -12,7 +12,7 @@ import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class EnhancedHttpSource(
|
||||
val originalSource: HttpSource,
|
||||
val enchancedSource: HttpSource
|
||||
val enhancedSource: HttpSource
|
||||
) : HttpSource() {
|
||||
private val prefs: PreferencesHelper by injectLazy()
|
||||
|
||||
@ -215,9 +215,9 @@ class EnhancedHttpSource(
|
||||
*/
|
||||
override fun getFilterList() = source().getFilterList()
|
||||
|
||||
private fun source(): HttpSource {
|
||||
fun source(): HttpSource {
|
||||
return if (prefs.eh_delegateSources().get()) {
|
||||
enchancedSource
|
||||
enhancedSource
|
||||
} else {
|
||||
originalSource
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user