Refactor and cleanup a bunch of code

This commit is contained in:
Jobobby04
2020-10-27 19:52:32 -04:00
parent 114fb723dc
commit 9cba544ffd
62 changed files with 521 additions and 1384 deletions
@@ -235,21 +235,22 @@ class EnhancedHttpSource(
originalSource
}
}
companion object {
fun Source.getMainSource(): Source {
return if (this is EnhancedHttpSource) {
this.source()
} else {
this
}
}
fun Source.getOriginalSource(): Source {
return if (this is EnhancedHttpSource) {
this.originalSource
} else {
this
}
}
}
}
fun Source.getMainSource(): Source = if (this is EnhancedHttpSource) {
this.source()
} else {
this
}
fun Source.getOriginalSource(): Source = if (this is EnhancedHttpSource) {
this.originalSource
} else {
this
}
fun Source.getEnhancedSource(): Source = if (this is EnhancedHttpSource) {
this.enhancedSource
} else {
this
}