grtsinry43 e373670715
refactor: Improve shared element transition for images
This commit refactors the shared element transitions for images to be more specific and robust, creating a smoother animation between the post list/detail and the full-screen image viewer.

**Key Changes:**

*   **Refined Shared Element Keys:**
    *   The shared element key for images is now based on both `postId` and `imageIndex` (e.g., `post_image_{postId}_{imageIndex}`). This replaces the previous, less specific key (`post_card_{postId}`), ensuring that the correct image animates, especially in multi-image posts.

*   **Improved Animation:**
    *   The animation `tween` duration has been standardized to 400ms with a `FastOutSlowInEasing` curve for a more polished and consistent feel across all image transitions.

*   **Navigation & State Handling:**
    *   The navigation route for `PostDetail` now accepts an `imageIndex` parameter, allowing direct navigation to a specific image within the image detail view.
    *   The `PostDetailContainer` now uses the passed `initialImageIndex` to correctly display the selected image when entering image mode.
    *   Shared element transitions are now conditionally applied only during the initial navigation into a mode (text or image) to prevent animation conflicts when switching between them.

*   **Component Updates:**
    *   `PostCardImages` and `PostDetailImages` now accept `sharedTransitionScope` and `animatedContentScope` to correctly apply the shared element modifier to each image.
    *   `ImageDetailScreen` has been updated to use the new `imageIndex`-based keying for its `ZoomableImage`.
2025-10-06 02:47:03 +08:00
2025-10-05 01:20:02 +08:00
2025-10-05 01:20:02 +08:00
2025-10-05 01:20:02 +08:00
2025-10-05 01:20:02 +08:00
2025-10-05 01:20:02 +08:00
Description
No description provided
26 MiB
Languages
Kotlin 100%