mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Don't use the new iPad modal presentation mode for the timeline item menu. (#3325)
This commit is contained in:
@@ -51,6 +51,7 @@ struct TimelineItemMenu: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.timelineItemActionMenu)
|
.accessibilityIdentifier(A11yIdentifiers.roomScreen.timelineItemActionMenu)
|
||||||
|
.presentationPage()
|
||||||
.presentationDetents([.medium, .large])
|
.presentationDetents([.medium, .large])
|
||||||
.presentationBackground(Color.compound.bgCanvasDefault)
|
.presentationBackground(Color.compound.bgCanvasDefault)
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
@@ -233,6 +234,17 @@ private extension EncryptionAuthenticity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension View {
|
||||||
|
/// Uses the old page style modal so that on iPadOS 18 the presentation detents have no effect.
|
||||||
|
@ViewBuilder func presentationPage() -> some View {
|
||||||
|
if #available(iOS 18.0, *) {
|
||||||
|
presentationSizing(.page)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Previews
|
// MARK: - Previews
|
||||||
|
|
||||||
struct TimelineItemMenu_Previews: PreviewProvider, TestablePreview {
|
struct TimelineItemMenu_Previews: PreviewProvider, TestablePreview {
|
||||||
|
|||||||
Reference in New Issue
Block a user