Fix EHentai reading progress not carrying over
This commit is contained in:
@@ -4,10 +4,16 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
enum class DebugToggles(val default: Boolean) {
|
||||
// Redirect to master version of gallery when encountering a gallery that has a parent/child that is already in the library
|
||||
ENABLE_EXH_ROOT_REDIRECT(true),
|
||||
// Enable debug overlay (only available in debug builds)
|
||||
ENABLE_DEBUG_OVERLAY(true),
|
||||
// Convert non-root galleries into root galleries when loading them
|
||||
PULL_TO_ROOT_WHEN_LOADING_EXH_MANGA_DETAILS(true),
|
||||
RESTRICT_EXH_GALLERY_UPDATE_CHECK_FREQUENCY(true);
|
||||
// Do not update the same gallery too often
|
||||
RESTRICT_EXH_GALLERY_UPDATE_CHECK_FREQUENCY(true),
|
||||
// Pretend that all galleries only have a single version
|
||||
INCLUDE_ONLY_ROOT_WHEN_LOADING_EXH_VERSIONS(false);
|
||||
|
||||
val prefKey = "eh_debug_toggle_${name.toLowerCase()}"
|
||||
|
||||
|
||||
@@ -87,9 +87,7 @@ class EHentaiUpdateHelper(context: Context) {
|
||||
.fold(accepted.chapters) { curChapters, chapter ->
|
||||
val existing = curChapters.find { it.url == chapter.url }
|
||||
|
||||
val newLastPageRead = chainsAsChapters.filter { it.date_upload < chapter.date_upload }.maxBy {
|
||||
it.last_page_read
|
||||
}?.last_page_read
|
||||
val newLastPageRead = chainsAsChapters.maxBy { it.last_page_read }?.last_page_read
|
||||
|
||||
if (existing != null) {
|
||||
existing.read = existing.read || chapter.read
|
||||
|
||||
Reference in New Issue
Block a user