mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 05:15:10 +01:00
Forcing webtoon mode on manhwa and long strip
This commit is contained in:
parent
f0cb967f6a
commit
7ef5e59421
@ -103,16 +103,14 @@ interface Manga : SManga {
|
||||
val currentTags = genre?.split(",")?.map { it.trim().toLowerCase(Locale.US) }
|
||||
return if (currentTags?.any
|
||||
{ tag ->
|
||||
tag == "long strip" || tag == "manhwa" ||
|
||||
tag.contains("webtoon")
|
||||
} == true || isWebtoonSource(sourceName) ||
|
||||
sourceName.contains("tapastic", true))
|
||||
tag == "long strip" || tag == "manhwa" || tag.contains("webtoon")
|
||||
} == true || isWebtoonSource(sourceName))
|
||||
ReaderActivity.WEBTOON
|
||||
else if (currentTags?.any
|
||||
{ tag ->
|
||||
tag == "chinese" || tag == "manhua" ||
|
||||
tag.startsWith("english") || tag == "comic"
|
||||
} == true || isComicSource(sourceName) ||
|
||||
} == true || (isComicSource(sourceName) && !sourceName.contains("tapastic", true)) ||
|
||||
sourceName.contains("manhua", true))
|
||||
ReaderActivity.LEFT_TO_RIGHT
|
||||
else 0
|
||||
@ -126,7 +124,6 @@ interface Manga : SManga {
|
||||
|
||||
fun isComicSource(sourceName: String): Boolean {
|
||||
return sourceName.contains("gunnerkrigg", true) ||
|
||||
sourceName.contains("gunnerkrigg", true) ||
|
||||
sourceName.contains("dilbert", true) ||
|
||||
sourceName.contains("cyanide", true) ||
|
||||
sourceName.contains("xkcd", true) ||
|
||||
|
@ -420,7 +420,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
).toLowerCase(Locale.getDefault())
|
||||
), 8000
|
||||
) {
|
||||
setAction(R.string.use_default) {
|
||||
if (mangaViewer != WEBTOON) setAction(R.string.use_default) {
|
||||
presenter.setMangaViewer(0)
|
||||
}
|
||||
}
|
||||
|
@ -419,8 +419,10 @@ class ReaderPresenter(
|
||||
*/
|
||||
fun getMangaViewer(): Int {
|
||||
val manga = manga ?: return preferences.defaultViewer()
|
||||
if (manga.viewer == -1) {
|
||||
manga.viewer = manga.defaultReaderType()
|
||||
val readerType = manga.defaultReaderType()
|
||||
if (manga.viewer == -1 ||
|
||||
(readerType == ReaderActivity.WEBTOON && readerType != manga.viewer)) {
|
||||
manga.viewer = readerType
|
||||
db.updateMangaViewer(manga).asRxObservable().subscribe()
|
||||
}
|
||||
return if (manga.viewer == 0) preferences.defaultViewer() else manga.viewer
|
||||
|
Loading…
Reference in New Issue
Block a user