1 parent
45411fa14d
commit
65f58b93ed
2 files changed
+7
-13
No files matched your search
@@ -281,12 +281,9 @@ class ReaderActivity : EhActivity() {
|
||||
mGalleryProvider!!.start()
|
||||
|
||||
// Get start page
|
||||
val startPage: Int = if (savedInstanceState == null) {
|
||||
if (mPage >= 0) mPage else mGalleryProvider!!.startPage
|
||||
} else {
|
||||
mCurrentIndex
|
||||
if (savedInstanceState == null) {
|
||||
mCurrentIndex = if (mPage >= 0) mPage else mGalleryProvider!!.startPage
|
||||
}
|
||||
mCurrentIndex = startPage
|
||||
|
||||
lifecycleScope.launch(Dispatchers.Main) {
|
||||
mGalleryProvider!!.state.collect {
|
||||
@@ -788,7 +785,7 @@ class ReaderActivity : EhActivity() {
|
||||
setTooltip(R.string.action_settings)
|
||||
val readerSettingSheetDialog = ReaderSettingsSheet(this@ReaderActivity)
|
||||
setOnClickListener {
|
||||
if (!readerSettingSheetDialog.isShowing()) {
|
||||
if (!readerSettingSheetDialog.isShowing) {
|
||||
readerSettingSheetDialog.show()
|
||||
}
|
||||
}
|
||||
@@ -882,7 +879,8 @@ class ReaderActivity : EhActivity() {
|
||||
binding.pageSlider.valueTo = max(pages.lastIndex.toFloat(), 1f)
|
||||
binding.pageSlider.value = page.index.toFloat()
|
||||
|
||||
mGalleryProvider?.putStartPage(page.index)
|
||||
mCurrentIndex = page.index
|
||||
mGalleryProvider?.putStartPage(mCurrentIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,16 +12,14 @@ import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.WebtoonLayoutManager
|
||||
import eu.kanade.tachiyomi.ui.reader.loader.PageLoader
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.loader.PageLoader
|
||||
import eu.kanade.tachiyomi.ui.reader.model.ReaderPage
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation.NavigationRegion
|
||||
import eu.kanade.tachiyomi.util.system.logcat
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* Implementation of a [BaseViewer] to display pages with a [RecyclerView].
|
||||
@@ -171,9 +169,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
|
||||
val position = adapter.items.indexOf(page)
|
||||
if (position != -1) {
|
||||
layoutManager.scrollToPositionWithOffset(position, 0)
|
||||
if (layoutManager.findLastEndVisibleItemPosition() == -1) {
|
||||
onScrolled(pos = position)
|
||||
}
|
||||
onScrolled(pos = position)
|
||||
} else {
|
||||
logcat { "Page $page not found in adapter" }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user