mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-04-27 02:14:45 +00:00
Media: Cleanup unused context menu
This commit is contained in:
parent
f93e4063f2
commit
23fe7d3373
1 changed files with 0 additions and 40 deletions
|
@ -6,7 +6,6 @@ import NukeUI
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
public struct StatusRowMediaPreviewView: View {
|
public struct StatusRowMediaPreviewView: View {
|
||||||
@Environment(\.openURL) private var openURL
|
|
||||||
@Environment(\.isSecondaryColumn) private var isSecondaryColumn: Bool
|
@Environment(\.isSecondaryColumn) private var isSecondaryColumn: Bool
|
||||||
@Environment(\.extraLeadingInset) private var extraLeadingInset: CGFloat
|
@Environment(\.extraLeadingInset) private var extraLeadingInset: CGFloat
|
||||||
@Environment(\.isInCaptureMode) private var isInCaptureMode: Bool
|
@Environment(\.isInCaptureMode) private var isInCaptureMode: Bool
|
||||||
|
@ -91,9 +90,6 @@ public struct StatusRowMediaPreviewView: View {
|
||||||
await quickLook.prepareFor(urls: attachments.compactMap { $0.url }, selectedURL: attachment.url!)
|
await quickLook.prepareFor(urls: attachments.compactMap { $0.url }, selectedURL: attachment.url!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.contextMenu {
|
|
||||||
contextMenuForMedia(mediaAttachement: attachment)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if isNotifications || theme.statusDisplayStyle == .compact {
|
if isNotifications || theme.statusDisplayStyle == .compact {
|
||||||
HStack {
|
HStack {
|
||||||
|
@ -272,9 +268,6 @@ public struct StatusRowMediaPreviewView: View {
|
||||||
await quickLook.prepareFor(urls: attachments.compactMap { $0.url }, selectedURL: attachment.url!)
|
await quickLook.prepareFor(urls: attachments.compactMap { $0.url }, selectedURL: attachment.url!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.contextMenu {
|
|
||||||
contextMenuForMedia(mediaAttachement: attachment)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,37 +326,4 @@ public struct StatusRowMediaPreviewView: View {
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
|
||||||
private func contextMenuForMedia(mediaAttachement: MediaAttachment) -> some View {
|
|
||||||
if let url = mediaAttachement.url {
|
|
||||||
ShareLink(item: url) {
|
|
||||||
Label("status.media.contextmenu.share", systemImage: "square.and.arrow.up")
|
|
||||||
}
|
|
||||||
Button { openURL(url) } label: {
|
|
||||||
Label("status.media.contextmenu.view-browser", systemImage: "safari")
|
|
||||||
}
|
|
||||||
Divider()
|
|
||||||
Button {
|
|
||||||
Task {
|
|
||||||
do {
|
|
||||||
let image = try await ImagePipeline.shared.image(for: url).image
|
|
||||||
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
|
|
||||||
} catch {}
|
|
||||||
}
|
|
||||||
} label: {
|
|
||||||
Label("status.media.contextmenu.save", systemImage: "square.and.arrow.down")
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Task {
|
|
||||||
do {
|
|
||||||
let image = try await ImagePipeline.shared.image(for: url).image
|
|
||||||
UIPasteboard.general.image = image
|
|
||||||
} catch {}
|
|
||||||
}
|
|
||||||
} label: {
|
|
||||||
Label("status.media.contextmenu.copy", systemImage: "doc.on.doc")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue