Dimillian / IceCubesApp

A SwiftUI Mastodon client
https://apps.apple.com/us/app/ice-cubes-for-mastodon/id6444915884
GNU Affero General Public License v3.0
5.36k stars 504 forks source link

Swipe actions overlapped with images #1845 #2000

Closed mdhsieh closed 6 months ago

mdhsieh commented 7 months ago

Environment:

Issue:

https://github.com/Dimillian/IceCubesApp/issues/1845 Multiple images overlap left swipe actions.

Causes:

In StatusRowMediaViewPreview, the scrollClipDisabled() modifier allows multiple images to overflow outside the scrolling area. However from my understanding it was designed to flow on top of other content.

Solution:

Replace scrollClipDisabled() with negative horizontal padding, and the same amount of content margin. That way we have the same visual effect as before, but there's no overlap problem.

Tested on iPhone and iPad 17.0

Demo video:

https://github.com/Dimillian/IceCubesApp/assets/52055110/97f5bbe6-9281-4af7-9952-e03f7cfcdab0

Dimillian commented 6 months ago

I'm closing this for now, I agree that it fixes it, but it's cutting the effect instead of visually showing infinite scrolling. I would prefer to find something better, if possible.

mdhsieh commented 6 months ago

I'm closing this for now, I agree that it fixes it, but it's cutting the effect instead of visually showing infinite scrolling. I would prefer to find something better, if possible.

Sure, it would be nice if someone can come up with a more proper solution.