mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 17:51:01 +00:00
Fix image preview sheet
This commit is contained in:
parent
b0846c9a3d
commit
4dd4968bb2
3 changed files with 13 additions and 3 deletions
|
@ -26,12 +26,21 @@ extension IceCubesApp {
|
||||||
.environment(appIntentService)
|
.environment(appIntentService)
|
||||||
.environment(\.isSupporter, isSupporter)
|
.environment(\.isSupporter, isSupporter)
|
||||||
.sheet(item: $quickLook.selectedMediaAttachment) { selectedMediaAttachment in
|
.sheet(item: $quickLook.selectedMediaAttachment) { selectedMediaAttachment in
|
||||||
|
if #available(iOS 18.0, *) {
|
||||||
|
MediaUIView(selectedAttachment: selectedMediaAttachment,
|
||||||
|
attachments: quickLook.mediaAttachments)
|
||||||
|
.presentationBackground(.ultraThinMaterial)
|
||||||
|
.presentationCornerRadius(16)
|
||||||
|
.presentationSizing(.page)
|
||||||
|
.withEnvironments()
|
||||||
|
} else {
|
||||||
MediaUIView(selectedAttachment: selectedMediaAttachment,
|
MediaUIView(selectedAttachment: selectedMediaAttachment,
|
||||||
attachments: quickLook.mediaAttachments)
|
attachments: quickLook.mediaAttachments)
|
||||||
.presentationBackground(.ultraThinMaterial)
|
.presentationBackground(.ultraThinMaterial)
|
||||||
.presentationCornerRadius(16)
|
.presentationCornerRadius(16)
|
||||||
.withEnvironments()
|
.withEnvironments()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.onChange(of: pushNotificationsService.handledNotification) { _, newValue in
|
.onChange(of: pushNotificationsService.handledNotification) { _, newValue in
|
||||||
if newValue != nil {
|
if newValue != nil {
|
||||||
pushNotificationsService.handledNotification = nil
|
pushNotificationsService.handledNotification = nil
|
||||||
|
|
|
@ -16,6 +16,8 @@ public struct MediaUIAttachmentImageView: View {
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.padding(.horizontal, 8)
|
.padding(.horizontal, 8)
|
||||||
|
.padding(.top, 44)
|
||||||
|
.padding(.bottom, 32)
|
||||||
.scaleEffect(zoom)
|
.scaleEffect(zoom)
|
||||||
} else if state.isLoading {
|
} else if state.isLoading {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
|
|
|
@ -93,7 +93,6 @@ private struct DismissToolbarItem: ToolbarContent {
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "xmark.circle")
|
Image(systemName: "xmark.circle")
|
||||||
}
|
}
|
||||||
.opacity(0)
|
|
||||||
.keyboardShortcut(.cancelAction)
|
.keyboardShortcut(.cancelAction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue