SY linting

This commit is contained in:
Jobobby04
2022-09-11 19:43:45 -04:00
parent d58dda10d4
commit 3562816e89
67 changed files with 382 additions and 147 deletions
+3 -1
View File
@@ -55,7 +55,9 @@ private class DataSaverImpl(preferences: PreferencesHelper) : DataSaver {
imageUrl.contains(".gif", true) -> if (ignoreGif) imageUrl else getUrl(imageUrl)
else -> getUrl(imageUrl)
}
} else imageUrl
} else {
imageUrl
}
}
private fun getUrl(imageUrl: String): String {
+4 -2
View File
@@ -80,7 +80,9 @@ fun DomainManga.mangaType(sourceName: String? = Injekt.get<SourceManager>().get(
fun Manga.defaultReaderType(type: MangaType = mangaType()): Int? {
return if (type == MangaType.TYPE_MANHWA || type == MangaType.TYPE_WEBTOON) {
ReadingModeType.WEBTOON.prefValue
} else null
} else {
null
}
}
private fun isMangaTag(tag: String): Boolean {
@@ -184,5 +186,5 @@ enum class MangaType {
TYPE_MANHWA,
TYPE_MANHUA,
TYPE_COMIC,
TYPE_WEBTOON
TYPE_WEBTOON,
}
+3 -1
View File
@@ -26,5 +26,7 @@ fun Response.interceptAsHtml(block: (Document) -> Unit): Response {
}
rebuiltResponse
} else this
} else {
this
}
}
+8 -3
View File
@@ -41,8 +41,12 @@ object SourceTagsUtil {
TSUMINO_SOURCE_ID -> wrapTagTsumino(parsed.namespace, parsed.name.substringBefore('|').trim())
else -> wrapTag(parsed.namespace, parsed.name.substringBefore('|').trim())
}
} else null
} else null
} else {
null
}
} else {
null
}
}
private fun wrapTag(namespace: String, tag: String) = if (tag.contains(spaceRegex)) {
@@ -103,7 +107,8 @@ object SourceTagsUtil {
IMAGE_SET_COLOR("#3f51b5"),
COSPLAY_COLOR("#9c27b0"),
ASIAN_PORN_COLOR("#9575cd"),
MISC_COLOR("#f06292");
MISC_COLOR("#f06292"),
;
constructor(color: String) : this(Color.parseColor(color))
}