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