Formatting

This commit is contained in:
arkon
2022-04-08 16:44:23 -04:00
parent 2dfafa387b
commit 5afff31f72
197 changed files with 481 additions and 483 deletions

View File

@@ -186,7 +186,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
artist = obj["artist"]?.jsonPrimitive?.contentOrNull ?: manga.artist,
description = obj["description"]?.jsonPrimitive?.contentOrNull ?: manga.description,
genres = obj["genre"]?.jsonArray?.map { it.jsonPrimitive.content } ?: manga.genres,
status = obj["status"]?.jsonPrimitive?.intOrNull ?: manga.status
status = obj["status"]?.jsonPrimitive?.intOrNull ?: manga.status,
)
} else {
manga
@@ -314,7 +314,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
private class OrderBy(context: Context) : Filter.Sort(
context.getString(R.string.local_filter_order_by),
arrayOf(context.getString(R.string.title), context.getString(R.string.date)),
Selection(0, true)
Selection(0, true),
)
sealed class Format {
@@ -353,5 +353,5 @@ private val WHITESPACE_CHARS = arrayOf(
'\u2029',
'\u202F',
'\u205F',
'\u3000'
'\u3000',
)

View File

@@ -42,7 +42,7 @@ interface Source : tachiyomi.source.Source {
*/
@Deprecated(
"Use the 1.x API instead",
ReplaceWith("getMangaDetails")
ReplaceWith("getMangaDetails"),
)
fun fetchMangaDetails(manga: SManga): Observable<SManga> = throw IllegalStateException("Not used")
@@ -53,7 +53,7 @@ interface Source : tachiyomi.source.Source {
*/
@Deprecated(
"Use the 1.x API instead",
ReplaceWith("getChapterList")
ReplaceWith("getChapterList"),
)
fun fetchChapterList(manga: SManga): Observable<List<SChapter>> = throw IllegalStateException("Not used")
@@ -65,7 +65,7 @@ interface Source : tachiyomi.source.Source {
*/
@Deprecated(
"Use the 1.x API instead",
ReplaceWith("getPageList")
ReplaceWith("getPageList"),
)
fun fetchPageList(chapter: SChapter): Observable<List<Page>> = Observable.empty()

View File

@@ -45,7 +45,7 @@ open class SourceManager(private val context: Context) {
}
private fun createInternalSources(): List<Source> = listOf(
LocalSource(context)
LocalSource(context),
)
inner class StubSource(override val id: Long) : Source {

View File

@@ -68,13 +68,13 @@ open class Page(
fun Page.toPageUrl(): PageUrl {
return PageUrl(
url = this.imageUrl ?: this.url
url = this.imageUrl ?: this.url,
)
}
fun PageUrl.toPage(index: Int): Page {
return Page(
index = index,
imageUrl = this.url
imageUrl = this.url,
)
}

View File

@@ -36,7 +36,7 @@ fun SChapter.toChapterInfo(): ChapterInfo {
key = this.url,
name = this.name,
number = this.chapter_number,
scanlator = this.scanlator ?: ""
scanlator = this.scanlator ?: "",
)
}

View File

@@ -75,7 +75,7 @@ fun SManga.toMangaInfo(): MangaInfo {
description = this.description ?: "",
genres = this.genre?.split(", ") ?: emptyList(),
status = this.status,
cover = this.thumbnail_url ?: ""
cover = this.thumbnail_url ?: "",
)
}