Media browser tweaks (#3692)

* Move the media actions from the bottom bar into the details sheet.

* Allow the media type picker to fill the width of the screen.
This commit is contained in:
Doug
2025-01-21 17:00:04 +00:00
committed by GitHub
parent 55e399aaf7
commit 909ee4abf2
43 changed files with 203 additions and 160 deletions
@@ -14,6 +14,9 @@ struct TimelineMediaPreviewRedactConfirmationView: View {
let item: TimelineMediaPreviewItem
@ObservedObject var context: TimelineMediaPreviewViewModel.Context
@State private var sheetHeight: CGFloat = .zero
private let topPadding: CGFloat = 19
var body: some View {
ScrollView {
VStack(spacing: 0) {
@@ -21,10 +24,12 @@ struct TimelineMediaPreviewRedactConfirmationView: View {
preview
buttons
}
.readHeight($sheetHeight)
}
.presentationDetents([.medium])
.scrollBounceBehavior(.basedOnSize)
.padding(.top, topPadding) // For the drag indicator
.presentationDetents([.height(sheetHeight + topPadding)])
.presentationDragIndicator(.visible)
.padding(.top, 19) // For the drag indicator
.presentationBackground(.compound.bgCanvasDefault)
.preferredColorScheme(.dark)
}