Tools View & Crash Report & OOM Report

This commit is contained in:
世界
2026-04-23 08:12:52 +08:00
parent 73180f0230
commit b48f4ad97f
46 changed files with 4279 additions and 533 deletions
@@ -82,7 +82,7 @@ public struct ShareButtonCompat<Label: View>: View {
do {
let shareItem = try await itemURL()
await MainActor.run {
presentShareController(shareItem)
presentShareSheet(shareItem)
}
} catch {
await MainActor.run {
@@ -91,22 +91,6 @@ public struct ShareButtonCompat<Label: View>: View {
}
}
private func presentShareController(_ item: URL) {
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let rootViewController = windowScene.keyWindow?.rootViewController
else {
return
}
var topViewController = rootViewController
while let presented = topViewController.presentedViewController {
topViewController = presented
}
topViewController.present(
UIActivityViewController(activityItems: [item], applicationActivities: nil),
animated: true
)
}
#elseif os(macOS)
private nonisolated func shareItemAsync() async {
do {
@@ -125,7 +109,7 @@ public struct ShareButtonCompat<Label: View>: View {
}
#if os(macOS)
private struct SharingServicePicker: NSViewRepresentable {
struct SharingServicePicker: NSViewRepresentable {
@Binding private var isPresented: Bool
@Binding private var alert: AlertState?
@Binding private var item: URL?