When an image in the webtoon reader is shorter than the screen height, it was being incorrectly scaled, causing it to appear zoomed in or cropped.
This was caused by the `scrollTo` function in `WebtoonImageView.kt` calling `resetScaleAndCenter()` for images with a scroll range of zero. This method, from the underlying SubsamplingScaleImageView library, resets the image to a default scale instead of using the custom logic required by the reader.
The fix replaces the call to `resetScaleAndCenter()` with `scrollToInternal(0)`. This ensures that the custom scaling logic, which fits the image to the screen width, is applied consistently to all images, regardless of their height.
Currently translated at 100.0% (875 of 875 strings)
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (875 of 875 strings)
Co-authored-by: return_null <demolang@dismail.de>
Translate-URL: https://hosted.weblate.org/projects/kotatsu/strings/zh_Hans/
Translation: Kotatsu/Strings
- Compare content.state with getCurrentState() to detect configuration changes vs intentional updates
- Use content.state when they match (mode switch case) to preserve explicit state updates
- Use getCurrentState() when they differ (rotation case) to restore saved position
- This ensures both screen rotation and mode switching work correctly
Co-authored-by: NathanBap <101987516+NathanBap@users.noreply.github.com>
- Modified BaseReaderFragment to always use getCurrentState() when available
- getCurrentState() contains the most recent reading position saved in onPause/onDestroyView
- content.state may contain the initial state from when content was first loaded
- This ensures the current page position is preserved across configuration changes like screen rotation
Co-authored-by: NathanBap <101987516+NathanBap@users.noreply.github.com>
Currently translated at 100.0% (875 of 875 strings)
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (869 of 869 strings)
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (865 of 869 strings)
Co-authored-by: return_null <demolang@dismail.de>
Translate-URL: https://hosted.weblate.org/projects/kotatsu/strings/zh_Hans/
Translation: Kotatsu/Strings
Currently translated at 51.7% (453 of 875 strings)
Translated using Weblate (Malay)
Currently translated at 51.6% (452 of 875 strings)
Translated using Weblate (Malay)
Currently translated at 49.5% (431 of 869 strings)
Translated using Weblate (Javanese)
Currently translated at 9.4% (82 of 869 strings)
Translated using Weblate (Javanese)
Currently translated at 100.0% (9 of 9 strings)
Translated using Weblate (Malay)
Currently translated at 40.5% (352 of 869 strings)
Translated using Weblate (Indonesian)
Currently translated at 100.0% (869 of 869 strings)
Translated using Weblate (Indonesian)
Currently translated at 100.0% (9 of 9 strings)
Added translation using Weblate (Javanese)
Added translation using Weblate (Javanese)
Translated using Weblate (Malay)
Currently translated at 38.4% (334 of 869 strings)
Translated using Weblate (Indonesian)
Currently translated at 100.0% (869 of 869 strings)
Translated using Weblate (Indonesian)
Currently translated at 100.0% (9 of 9 strings)
Co-authored-by: Nataniel Dika Kurniawan <hikawaart2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kotatsu/plurals/id/
Translate-URL: https://hosted.weblate.org/projects/kotatsu/plurals/jv/
Translate-URL: https://hosted.weblate.org/projects/kotatsu/strings/id/
Translate-URL: https://hosted.weblate.org/projects/kotatsu/strings/jv/
Translate-URL: https://hosted.weblate.org/projects/kotatsu/strings/ms/
Translation: Kotatsu/Strings
Translation: Kotatsu/plurals