Skip to content

Conversation

@theScrabi
Copy link
Member

Dear @Stypox when you simplified the ThumbnailPreview you introduced a regression :P. The getHeight() function as well as the Box inside the AnimatedVisibility is necesary to prevent glitches to appear when fading in or out. This is because compose does not seem to be able to calculate the size and position of the thumbnail correctly during animation. For this reason we just animate the whole strip where the thumbnail can move on.

With glitches:
with_glitch.webm

Glitches fixed:
glitch_fix.webm

@theScrabi theScrabi changed the title fix thumbnail prevew animation regression draft: fix thumbnail prevew animation regression Apr 18, 2025
@theScrabi
Copy link
Member Author

theScrabi commented Apr 18, 2025

This will take a while to fix,
The chapter title preview destorys the position calculation.

@Stypox
Copy link
Member

Stypox commented Apr 18, 2025

Mmmh I remember noticing the same issue both with and without #20 but maybe I remember wrongly. Does the problem happen also on an emulator or only in previews?

@theScrabi
Copy link
Member Author

theScrabi commented Apr 20, 2025

It happens in preview, the emulator and on device. The title preview isn't the issue though. This PR already delivers a fix for the issue. However additionally I noticed that, #18, made the preview thumbnail position calculation be wrong now. In order to apply my fix right now, we'd have to roll back the chapter thumbnail preview.
So I am going to work on a correct chapter preview text positioning as well :) This might take a while though.

@theScrabi theScrabi force-pushed the fix_thumbnail_regression branch from 6c95284 to 630d128 Compare May 27, 2025 10:14
@ShareASmile ShareASmile added the bug Issue/PR is related to a bug label May 28, 2025
@theScrabi theScrabi force-pushed the fix_thumbnail_regression branch from 458f941 to 973696d Compare June 2, 2025 14:10
@theScrabi
Copy link
Member Author

Ok so I learned today that SubcomposeLayout can fix all of my issues. Now the layout works well. No glitches, and the chapter text is independently placed.

Please note that I renamed chapter preview text to thumbnail preview text. This way also things like the playback position could be encoded into the text.

@theScrabi theScrabi changed the title draft: fix thumbnail prevew animation regression fix thumbnail prevew animation regression Jun 2, 2025
@theScrabi theScrabi force-pushed the fix_thumbnail_regression branch from 8757dd4 to f39e407 Compare June 2, 2025 15:14
@theScrabi theScrabi force-pushed the fix_thumbnail_regression branch from f39e407 to cde4b81 Compare June 2, 2025 15:42
@Stypox Stypox merged commit 1dbf7bf into dev Aug 16, 2025
2 of 3 checks passed
@theScrabi theScrabi deleted the fix_thumbnail_regression branch September 15, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue/PR is related to a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants