Address Build Warnings and Cleanup (#707)

* Address build warnings and cleanup

* Actual name of who defined the protocol

* Remove uneeded detekt supression

* GraphQL Before-After cleanup

* Lint

* Cleanup unused functions

* Fix some discrepancies with the 1.5 source api and fix lang exception
This commit is contained in:
Mitchell Syer
2023-10-15 20:16:30 -04:00
committed by GitHub
parent e70730e9a8
commit 682c364647
31 changed files with 151 additions and 278 deletions

View File

@@ -7,11 +7,11 @@ import rx.Observable
import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle
/**
* A basic interface for creating a source. It could be an online source, a local source, etc...
* A basic interface for creating a source. It could be an online source, a local source, etc.
*/
interface Source {
/**
* Id for the source. Must be unique.
* ID for the source. Must be unique.
*/
val id: Long
@@ -20,6 +20,9 @@ interface Source {
*/
val name: String
val lang: String
get() = ""
/**
* Get the updated details for a manga.
*
@@ -73,9 +76,7 @@ interface Source {
"Use the non-RxJava API instead",
ReplaceWith("getPageList"),
)
fun fetchPageList(chapter: SChapter): Observable<List<Page>> = Observable.empty()
fun fetchPageList(chapter: SChapter): Observable<List<Page>> = throw IllegalStateException("Not used")
}
// fun Source.icon(): Drawable? = Injekt.get<ExtensionManager>().getAppIconForSource(this)
fun Source.getPreferenceKey(): String = "source_$id"