mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -462,6 +462,9 @@ class ReadMangaActivity : VMBaseActivity<ActivityMangaBinding, MangaViewModel>()
|
||||
private fun disableMangaScaling(disable: Boolean) {
|
||||
binding.webtoonFrame.disableMangaScaling = disable
|
||||
binding.mRecyclerMange.disableMangaScaling = disable
|
||||
if (disable) {
|
||||
binding.mRecyclerMange.resetZoom()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -191,6 +191,10 @@ class WebtoonRecyclerView @JvmOverloads constructor(
|
||||
return true
|
||||
}
|
||||
|
||||
fun resetZoom() {
|
||||
zoom(currentScale, DEFAULT_RATE, x, 0f, y, 0f)
|
||||
}
|
||||
|
||||
private fun zoomScrollBy(dx: Int, dy: Int) {
|
||||
if (dx != 0) {
|
||||
x = getPositionX(x + dx)
|
||||
|
||||
Reference in New Issue
Block a user