From 6ab2441dbce2b57579e92df0c994c76198dd43f7 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 18 Dec 2024 16:26:48 +0000 Subject: [PATCH] Don't do the up-flip on iOS 17. --- .../View/MediaEventsTimelineScreen.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift index 583c7982e0..2c9c7ce0f6 100644 --- a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift @@ -211,12 +211,12 @@ struct MediaEventsTimelineScreen: View { } func scale(for item: RoomTimelineItemViewState, isGridLayout: Bool) -> CGSize { - guard item.identifier != context.viewState.currentPreviewItemID else { + if item.identifier == context.viewState.currentPreviewItemID, #available(iOS 18.0, *) { // Remove the flip when presenting a preview so that the zoom transition is the right way up 🙃 - return CGSize(width: 1, height: 1) + CGSize(width: 1, height: 1) + } else { + CGSize(width: isGridLayout ? -1 : 1, height: -1) } - - return CGSize(width: isGridLayout ? -1 : 1, height: -1) } }