Switch to different ktlint plugin
Should be better at incremental builds. To format, run `./gradlew ktlintFormat`. (cherry picked from commit d29b7c4e5735dc137d578d3bcb3da1f0a02573e8) # Conflicts: # buildSrc/src/main/kotlin/tachiyomi.lint.gradle.kts # data/src/main/java/tachiyomi/data/manga/MangaMapper.kt # domain/src/main/java/tachiyomi/domain/library/model/LibrarySortMode.kt # domain/src/main/java/tachiyomi/domain/library/service/LibraryPreferences.kt # domain/src/main/java/tachiyomi/domain/release/interactor/GetApplicationRelease.kt # presentation-core/src/main/java/tachiyomi/presentation/core/components/CollapsibleBox.kt
This commit is contained in:
@@ -64,7 +64,9 @@ interface Source {
|
||||
"Use the non-RxJava API instead",
|
||||
ReplaceWith("getMangaDetails"),
|
||||
)
|
||||
fun fetchMangaDetails(manga: SManga): Observable<SManga> = throw IllegalStateException("Not used")
|
||||
fun fetchMangaDetails(manga: SManga): Observable<SManga> = throw IllegalStateException(
|
||||
"Not used",
|
||||
)
|
||||
|
||||
/**
|
||||
* Returns an observable with all the available chapters for a manga.
|
||||
@@ -75,7 +77,9 @@ interface Source {
|
||||
"Use the non-RxJava API instead",
|
||||
ReplaceWith("getChapterList"),
|
||||
)
|
||||
fun fetchChapterList(manga: SManga): Observable<List<SChapter>> = throw IllegalStateException("Not used")
|
||||
fun fetchChapterList(manga: SManga): Observable<List<SChapter>> = throw IllegalStateException(
|
||||
"Not used",
|
||||
)
|
||||
|
||||
/**
|
||||
* Returns an observable with the list of pages a chapter has. Pages should be returned
|
||||
|
||||
@@ -3,7 +3,10 @@ package eu.kanade.tachiyomi.source.model
|
||||
sealed class Filter<T>(val name: String, var state: T) {
|
||||
open class Header(name: String) : Filter<Any>(name, 0)
|
||||
open class Separator(name: String = "") : Filter<Any>(name, 0)
|
||||
abstract class Select<V>(name: String, val values: Array<V>, state: Int = 0) : Filter<Int>(name, state)
|
||||
abstract class Select<V>(name: String, val values: Array<V>, state: Int = 0) : Filter<Int>(
|
||||
name,
|
||||
state,
|
||||
)
|
||||
abstract class Text(name: String, state: String = "") : Filter<String>(name, state)
|
||||
abstract class CheckBox(name: String, state: Boolean = false) : Filter<Boolean>(name, state)
|
||||
abstract class TriState(name: String, state: Int = STATE_IGNORE) : Filter<Int>(name, state) {
|
||||
|
||||
@@ -162,7 +162,11 @@ abstract class HttpSource : CatalogueSource {
|
||||
* @param query the search query.
|
||||
* @param filters the list of filters to apply.
|
||||
*/
|
||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||
override fun fetchSearchManga(
|
||||
page: Int,
|
||||
query: String,
|
||||
filters: FilterList,
|
||||
): Observable<MangasPage> {
|
||||
return Observable.defer {
|
||||
try {
|
||||
client.newCall(searchMangaRequest(page, query, filters)).asObservableSuccess()
|
||||
@@ -184,7 +188,11 @@ abstract class HttpSource : CatalogueSource {
|
||||
* @param query the search query.
|
||||
* @param filters the list of filters to apply.
|
||||
*/
|
||||
protected abstract fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request
|
||||
protected abstract fun searchMangaRequest(
|
||||
page: Int,
|
||||
query: String,
|
||||
filters: FilterList,
|
||||
): Request
|
||||
|
||||
/**
|
||||
* Parses the response from the site and returns a [MangasPage] object.
|
||||
|
||||
Reference in New Issue
Block a user