mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 01:55:06 +01:00
Turns out I don't know how to spell manhwa
h before w
This commit is contained in:
parent
1da1b281eb
commit
4e922eff9f
@ -38,11 +38,11 @@ interface Manga : SManga {
|
||||
return if (currentGenres()?.split(",")?.any
|
||||
{ tag ->
|
||||
val trimmedTag = tag.trim().toLowerCase(Locale.US)
|
||||
trimmedTag == "long strip" || trimmedTag == "manwha" ||
|
||||
trimmedTag == "long strip" || trimmedTag == "manhwa" ||
|
||||
trimmedTag.contains("webtoon")
|
||||
} == true ||
|
||||
sourceManager.getOrStub(source).name.contains("webtoon", true))
|
||||
TYPE_MANWHA
|
||||
TYPE_MANHWA
|
||||
else TYPE_MANGA
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ interface Manga : SManga {
|
||||
const val DISPLAY_MASK = 0x00100000
|
||||
|
||||
const val TYPE_MANGA = 1
|
||||
const val TYPE_MANWHA = 2
|
||||
const val TYPE_MANHWA = 2
|
||||
|
||||
fun create(source: Long): Manga = MangaImpl().apply {
|
||||
this.source = source
|
||||
|
@ -250,7 +250,7 @@ open class LibraryController(
|
||||
|
||||
override fun onActivityResumed(activity: Activity) {
|
||||
super.onActivityResumed(activity)
|
||||
if (observeLater) {
|
||||
if (observeLater && !::presenter.isInitialized) {
|
||||
presenter.getLibrary()
|
||||
}
|
||||
}
|
||||
@ -258,11 +258,13 @@ open class LibraryController(
|
||||
override fun onActivityPaused(activity: Activity) {
|
||||
super.onActivityPaused(activity)
|
||||
observeLater = true
|
||||
presenter.onDestroy()
|
||||
if (!::presenter.isInitialized)
|
||||
presenter.onDestroy()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
presenter.onDestroy()
|
||||
if (!::presenter.isInitialized)
|
||||
presenter.onDestroy()
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
|
@ -170,9 +170,9 @@ class LibraryPresenter(
|
||||
if (filterUnread == STATE_REALLY_EXCLUDE && item.manga.unread > 0) return@f false
|
||||
|
||||
if (filterMangaType == Manga.TYPE_MANGA &&
|
||||
item.manga.mangaType() == Manga.TYPE_MANWHA)
|
||||
item.manga.mangaType() == Manga.TYPE_MANHWA)
|
||||
return@f false
|
||||
if ((filterMangaType == Manga.TYPE_MANWHA) &&
|
||||
if ((filterMangaType == Manga.TYPE_MANHWA) &&
|
||||
item.manga.mangaType() == Manga.TYPE_MANGA) return@f false
|
||||
|
||||
|
||||
|
@ -338,7 +338,7 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A
|
||||
}
|
||||
filter = preferences.filterMangaType().getOrDefault()
|
||||
if (filter > 0) {
|
||||
filters.add(if (filter == 1) R.string.manga_only else R.string.manwha_only)
|
||||
filters.add(if (filter == 1) R.string.manga_only else R.string.manhwa_only)
|
||||
}
|
||||
return filters
|
||||
}
|
||||
@ -365,20 +365,20 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A
|
||||
filter_layout.addView(it)
|
||||
}
|
||||
|
||||
checkForManwha()
|
||||
checkForManhwa()
|
||||
}
|
||||
|
||||
private fun checkForManwha() {
|
||||
private fun checkForManhwa() {
|
||||
GlobalScope.launch(Dispatchers.IO, CoroutineStart.DEFAULT) {
|
||||
val db:DatabaseHelper by injectLazy()
|
||||
val librryManga = db.getLibraryMangas().executeAsBlocking()
|
||||
if (librryManga.any { it.mangaType() == Manga.TYPE_MANWHA }) {
|
||||
if (librryManga.any { it.mangaType() == Manga.TYPE_MANHWA }) {
|
||||
launchUI {
|
||||
val mangaType = inflate(R.layout.filter_buttons) as FilterTagGroup
|
||||
mangaType.setup(
|
||||
this@SortFilterBottomSheet,
|
||||
R.string.manga,
|
||||
R.string.manwha
|
||||
R.string.manhwa
|
||||
)
|
||||
this@SortFilterBottomSheet.mangaType = mangaType
|
||||
filter_layout.addView(mangaType)
|
||||
|
@ -396,9 +396,10 @@ class ReaderPresenter(
|
||||
val manga = manga ?: return preferences.defaultViewer()
|
||||
if (manga.viewer == -1) {
|
||||
val type =
|
||||
if (manga.mangaType() == Manga.TYPE_MANWHA) ReaderActivity.WEBTOON
|
||||
if (manga.mangaType() == Manga.TYPE_MANHWA) ReaderActivity.WEBTOON
|
||||
else 0
|
||||
setMangaViewer(type)
|
||||
manga.viewer = type
|
||||
db.updateMangaViewer(manga).asRxObservable().subscribe()
|
||||
}
|
||||
return if (manga.viewer == 0) preferences.defaultViewer() else manga.viewer
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<string name="name">Name</string>
|
||||
<string name="categories">Categories</string>
|
||||
<string name="manga">Manga</string>
|
||||
<string name="manwha">Manwha</string>
|
||||
<string name="manhwa">Manhwa</string>
|
||||
<string name="chapters">Chapters</string>
|
||||
<string name="track">Tracking</string>
|
||||
<string name="history">History</string>
|
||||
@ -47,7 +47,7 @@
|
||||
<string name="action_hide_categories">Hide categories</string>
|
||||
<string name="hiding_categories">Hiding categories</string>
|
||||
<string name="manga_only">Manga only</string>
|
||||
<string name="manwha_only">Manwha only</string>
|
||||
<string name="manhwa_only">Manhwa only</string>
|
||||
<string name="action_unlock_trackers">Unlock to access trackers</string>
|
||||
|
||||
<string name="sorting_by_">Sorting by %1$s</string>
|
||||
|
Loading…
Reference in New Issue
Block a user