mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-21 00:11:13 +01:00
Fix reading position not being saved when opening multi-versioned EH manga
This commit is contained in:
@@ -25,6 +25,7 @@ import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
|
||||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.data.updater.UpdaterJob
|
||||
import eu.kanade.tachiyomi.util.LocaleHelper
|
||||
import exh.debug.DebugToggles
|
||||
import exh.log.CrashlyticsPrinter
|
||||
import exh.log.EHDebugModeOverlay
|
||||
import exh.log.EHLogLevel
|
||||
@@ -53,7 +54,7 @@ open class App : Application() {
|
||||
setupNotificationChannels()
|
||||
GlobalScope.launch { deleteOldMetadataRealm() } // Delete old metadata DB (EH)
|
||||
Reprint.initialize(this) //Setup fingerprint (EH)
|
||||
if(BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest") {
|
||||
if((BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest") && DebugToggles.ENABLE_DEBUG_OVERLAY.enabled) {
|
||||
setupDebugOverlay()
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ fun Preference<Boolean>.invert(): Boolean = getOrDefault().let { set(!it); !it }
|
||||
|
||||
class PreferencesHelper(val context: Context) {
|
||||
|
||||
private val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
private val rxPrefs = RxSharedPreferences.create(prefs)
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val rxPrefs = RxSharedPreferences.create(prefs)
|
||||
|
||||
private val defaultDownloadsDir = Uri.fromFile(
|
||||
File(Environment.getExternalStorageDirectory().absolutePath + File.separator +
|
||||
|
||||
@@ -22,6 +22,7 @@ import exh.metadata.metadata.EHentaiSearchMetadata.Companion.TAG_TYPE_NORMAL
|
||||
import exh.metadata.metadata.base.RaisedSearchMetadata.Companion.TAG_TYPE_VIRTUAL
|
||||
import exh.metadata.nullIfBlank
|
||||
import exh.metadata.parseHumanReadableByteCount
|
||||
import exh.debug.DebugToggles
|
||||
import exh.ui.login.LoginController
|
||||
import exh.util.UriFilter
|
||||
import exh.util.UriGroup
|
||||
@@ -321,7 +322,7 @@ class EHentai(override val id: Long,
|
||||
// Pull to most recent
|
||||
val doc = response.asJsoup()
|
||||
val newerGallery = doc.select("#gnd a").lastOrNull()
|
||||
val pre = if(newerGallery != null) {
|
||||
val pre = if(newerGallery != null && DebugToggles.PULL_TO_ROOT_WHEN_LOADING_EXH_MANGA_DETAILS.enabled) {
|
||||
manga.url = EHentaiSearchMetadata.normalizeUrl(newerGallery.attr("href"))
|
||||
client.newCall(mangaDetailsRequest(manga))
|
||||
.asObservableSuccess().map { it.asJsoup() }
|
||||
|
||||
@@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.util.isNullOrUnsubscribed
|
||||
import eu.kanade.tachiyomi.util.syncChaptersWithSource
|
||||
import exh.EH_SOURCE_ID
|
||||
import exh.EXH_SOURCE_ID
|
||||
import exh.debug.DebugToggles
|
||||
import exh.eh.EHentaiUpdateHelper
|
||||
import exh.isEhBasedSource
|
||||
import rx.Observable
|
||||
@@ -115,7 +116,8 @@ class ChaptersPresenter(
|
||||
|
||||
// EXH -->
|
||||
if(chapters.isNotEmpty()
|
||||
&& (source.id == EXH_SOURCE_ID || source.id == EH_SOURCE_ID)) {
|
||||
&& (source.id == EXH_SOURCE_ID || source.id == EH_SOURCE_ID)
|
||||
&& DebugToggles.ENABLE_EXH_ROOT_REDIRECT.enabled) {
|
||||
// Check for gallery in library and accept manga with lowest id
|
||||
// Find chapters sharing same root
|
||||
add(updateHelper.findAcceptedRootAndDiscardOthers(chapters)
|
||||
|
||||
Reference in New Issue
Block a user