Skip to content

Commit 783822b

Browse files
committed
WIP
Signed-off-by: Milen Pivchev <[email protected]>
1 parent 3fc8c0f commit 783822b

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

iOSClient/Menu/NCContextMenu.swift

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import Foundation
77
import UIKit
8+
import SwiftUI
89
import Alamofire
910
import NextcloudKit
1011
import SVGKit
@@ -467,12 +468,22 @@ class NCContextMenu: NSObject {
467468
image: iconImage
468469
) { _ in
469470
Task {
470-
await NextcloudKit.shared.sendRequestAsync(account: metadata.account,
471-
fileId: metadata.fileId,
472-
filePath: metadata.path,
473-
url: item.url,
474-
method: item.method,
475-
params: item.params)
471+
let response = await NextcloudKit.shared.sendRequestAsync(account: metadata.account,
472+
fileId: metadata.fileId,
473+
filePath: metadata.path,
474+
url: item.url,
475+
method: item.method,
476+
params: item.params)
477+
478+
await MainActor.run {
479+
let viewer = DeclarativeUIViewer(
480+
rows: [.init(element: "URL", title: "Test", urlString: "/test")],
481+
baseURL: "test.com"
482+
)
483+
let hosting = UIHostingController(rootView: viewer)
484+
hosting.modalPresentationStyle = .pageSheet
485+
self.viewController.present(hosting, animated: true)
486+
}
476487
}
477488
}
478489

0 commit comments

Comments
 (0)