forked from melod1n/fast-messenger
5310596cf6
This commit refactors the swipe-to-dismiss gesture and the image sharing logic in the photo viewer. The swipe-to-dismiss animation is now smoother and more reliable, using `Animatable` instead of `animateFloatAsState`. The background dimming effect has also been improved to be more responsive to the drag gesture. Additionally, the responsibility for creating the share `Intent` has been moved from the composable screen into the `PhotoViewViewModel`, improving the separation of concerns. Key changes: - Replaced `animateFloatAsState` with `Animatable` for smoother swipe-to-dismiss animations. - Improved the alpha calculation for the background during the drag gesture. - Moved the creation of the share `Intent` into the `PhotoViewViewModel`. - Simplified the drag-handling logic by removing local state management from the composable.