remove pdfproviders
This commit is contained in:
@ -10,8 +10,6 @@
|
||||
0411792A26A22860004AE24F /* MacAppSmokeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0411792926A22860004AE24F /* MacAppSmokeTest.swift */; };
|
||||
0418837E2742E99F003E0001 /* Intercom in Frameworks */ = {isa = PBXBuildFile; productRef = 0418837D2742E99F003E0001 /* Intercom */; };
|
||||
041883802742FCF2003E0001 /* Utils in Frameworks */ = {isa = PBXBuildFile; productRef = 0418837F2742FCF2003E0001 /* Utils */; };
|
||||
042184EF273AD5F3002357B0 /* PDFViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042184EE273AD5F3002357B0 /* PDFViewer.swift */; };
|
||||
042184F0273AD5F3002357B0 /* PDFViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042184EE273AD5F3002357B0 /* PDFViewer.swift */; };
|
||||
042F48DC26DFD10E00BF98FC /* iOSLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042F48DB26DFD10E00BF98FC /* iOSLaunchTests.swift */; };
|
||||
045B1681279147E7005047F7 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = 045B1680279147E7005047F7 /* FirebaseMessaging */; };
|
||||
0465B9BE26CDD35F005558CD /* MainApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81BE98F0CB588F5FC577A13 /* MainApp.swift */; };
|
||||
@ -43,10 +41,6 @@
|
||||
42321E882714E6B00056429F /* styles in Resources */ = {isa = PBXBuildFile; fileRef = 42321E832714E6B00056429F /* styles */; };
|
||||
42321E892714E6B00056429F /* views in Resources */ = {isa = PBXBuildFile; fileRef = 42321E842714E6B00056429F /* views */; };
|
||||
42321E8A2714E6B00056429F /* views in Resources */ = {isa = PBXBuildFile; fileRef = 42321E842714E6B00056429F /* views */; };
|
||||
4255C6D82755A5350006422A /* NanoID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4255C6D72755A5350006422A /* NanoID.swift */; };
|
||||
4255C6D92755A5350006422A /* NanoID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4255C6D72755A5350006422A /* NanoID.swift */; };
|
||||
426408732744676C00A2AE46 /* PDFReaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 426408722744676B00A2AE46 /* PDFReaderView.swift */; };
|
||||
426408742744676C00A2AE46 /* PDFReaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 426408722744676B00A2AE46 /* PDFReaderView.swift */; };
|
||||
42FF1B33271154A700B38C38 /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FF1AEB271154A600B38C38 /* SafariWebExtensionHandler.swift */; };
|
||||
42FF1B34271154A700B38C38 /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FF1AEB271154A600B38C38 /* SafariWebExtensionHandler.swift */; };
|
||||
42FF1B35271154A700B38C38 /* _locales in Resources */ = {isa = PBXBuildFile; fileRef = 42FF1AED271154A600B38C38 /* _locales */; };
|
||||
@ -183,7 +177,6 @@
|
||||
0411792726A22860004AE24F /* UnitTests-MacApp.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UnitTests-MacApp.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0411792926A22860004AE24F /* MacAppSmokeTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacAppSmokeTest.swift; sourceTree = "<group>"; };
|
||||
0411792B26A22860004AE24F /* MacUnitTests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = MacUnitTests.plist; sourceTree = "<group>"; };
|
||||
042184EE273AD5F3002357B0 /* PDFViewer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDFViewer.swift; sourceTree = "<group>"; };
|
||||
042F48D926DFD10E00BF98FC /* UITests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UITests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
042F48DB26DFD10E00BF98FC /* iOSLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSLaunchTests.swift; sourceTree = "<group>"; };
|
||||
042F48DD26DFD10E00BF98FC /* iOSUITests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = iOSUITests.plist; sourceTree = "<group>"; };
|
||||
@ -214,8 +207,6 @@
|
||||
42321E822714E6B00056429F /* scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = scripts; sourceTree = "<group>"; };
|
||||
42321E832714E6B00056429F /* styles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = styles; sourceTree = "<group>"; };
|
||||
42321E842714E6B00056429F /* views */ = {isa = PBXFileReference; lastKnownFileType = folder; path = views; sourceTree = "<group>"; };
|
||||
4255C6D72755A5350006422A /* NanoID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NanoID.swift; sourceTree = "<group>"; };
|
||||
426408722744676B00A2AE46 /* PDFReaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDFReaderView.swift; sourceTree = "<group>"; };
|
||||
42FF1AEB271154A600B38C38 /* SafariWebExtensionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariWebExtensionHandler.swift; sourceTree = "<group>"; };
|
||||
42FF1AED271154A600B38C38 /* _locales */ = {isa = PBXFileReference; lastKnownFileType = folder; path = _locales; sourceTree = "<group>"; };
|
||||
42FF1AEE271154A600B38C38 /* images */ = {isa = PBXFileReference; lastKnownFileType = folder; path = images; sourceTree = "<group>"; };
|
||||
@ -476,9 +467,6 @@
|
||||
children = (
|
||||
0480E71B26D95096006CAE2F /* AppDelegate.swift */,
|
||||
D81BE98F0CB588F5FC577A13 /* MainApp.swift */,
|
||||
042184EE273AD5F3002357B0 /* PDFViewer.swift */,
|
||||
426408722744676B00A2AE46 /* PDFReaderView.swift */,
|
||||
4255C6D72755A5350006422A /* NanoID.swift */,
|
||||
42FF1AEA271154A600B38C38 /* SafariExtension */,
|
||||
B330B55BAF36E624637EE3BE /* ShareExtension */,
|
||||
04920CC5279671EF003EC1B6 /* PushNotificationConfig.swift */,
|
||||
@ -1035,10 +1023,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0480E71D26D95096006CAE2F /* AppDelegate.swift in Sources */,
|
||||
4255C6D92755A5350006422A /* NanoID.swift in Sources */,
|
||||
0465B9BE26CDD35F005558CD /* MainApp.swift in Sources */,
|
||||
426408742744676C00A2AE46 /* PDFReaderView.swift in Sources */,
|
||||
042184F0273AD5F3002357B0 /* PDFViewer.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1071,11 +1056,8 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0480E71C26D95096006CAE2F /* AppDelegate.swift in Sources */,
|
||||
4255C6D82755A5350006422A /* NanoID.swift in Sources */,
|
||||
04920CC6279671EF003EC1B6 /* PushNotificationConfig.swift in Sources */,
|
||||
CA7EE773095F267516D7AC98 /* MainApp.swift in Sources */,
|
||||
426408732744676C00A2AE46 /* PDFReaderView.swift in Sources */,
|
||||
042184EF273AD5F3002357B0 /* PDFViewer.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@ -1,14 +1,18 @@
|
||||
import Models
|
||||
import SwiftUI
|
||||
import Utils
|
||||
import WebKit
|
||||
|
||||
#if os(iOS)
|
||||
import App
|
||||
import Models
|
||||
import PSPDFKit
|
||||
import PSPDFKitUI
|
||||
import SwiftUI
|
||||
import Utils
|
||||
import WebKit
|
||||
|
||||
struct PDFReaderViewController: UIViewControllerRepresentable {
|
||||
static func registerKey() {
|
||||
if let pspdfKitKey = AppKeys.sharedInstance?.pspdfKitKey {
|
||||
SDK.setLicenseKey(pspdfKitKey)
|
||||
}
|
||||
}
|
||||
|
||||
let document: Document
|
||||
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
@ -1,14 +1,15 @@
|
||||
import App
|
||||
import Combine
|
||||
import SwiftUI
|
||||
import Utils
|
||||
|
||||
#if os(iOS)
|
||||
import PDFKit
|
||||
import PSPDFKit
|
||||
import PSPDFKitUI
|
||||
import Services
|
||||
|
||||
struct PDFViewer: View {
|
||||
@EnvironmentObject var dataService: DataService
|
||||
|
||||
struct ShareLink: Identifiable {
|
||||
let id: UUID
|
||||
let url: URL
|
||||
@ -36,7 +37,7 @@ import Utils
|
||||
}
|
||||
.updateControllerConfiguration { controller in
|
||||
print("document is valid", document.isValid)
|
||||
coordinator.setController(controller: controller)
|
||||
coordinator.setController(controller: controller, dataService: dataService)
|
||||
|
||||
// Disable the Document Editor
|
||||
controller.navigationItem.setRightBarButtonItems(
|
||||
@ -80,7 +81,11 @@ import Utils
|
||||
.onShouldShowMenuItemsForSelectedText(perform: { pageView, menuItems, selectedText in
|
||||
let copy = menuItems.first(where: { $0.identifier == "Copy" })
|
||||
let highlight = MenuItem(title: "Highlight", block: {
|
||||
_ = self.coordinator.highlightSelection(pageView: pageView, selectedText: selectedText)
|
||||
_ = self.coordinator.highlightSelection(
|
||||
pageView: pageView,
|
||||
selectedText: selectedText,
|
||||
dataService: dataService
|
||||
)
|
||||
})
|
||||
// let share = MenuItem(title: "Share", block: {
|
||||
// let shortId = self.coordinator.highlightSelection(pageView: pageView, selectedText: selectedText)
|
||||
@ -97,7 +102,7 @@ import Utils
|
||||
}
|
||||
|
||||
let remove = MenuItem(title: "Remove", block: {
|
||||
self.coordinator.remove(annotations: annotations)
|
||||
self.coordinator.remove(dataService: dataService, annotations: annotations)
|
||||
})
|
||||
result.append(remove)
|
||||
|
||||
@ -106,7 +111,7 @@ import Utils
|
||||
|
||||
if let shortId = shortId, FeatureFlag.enableShareButton {
|
||||
let share = MenuItem(title: "Share", block: {
|
||||
if let shareURL = viewModel.highlightShareURL(shortId: shortId) {
|
||||
if let shareURL = viewModel.highlightShareURL(dataService: dataService, shortId: shortId) {
|
||||
shareLink = ShareLink(id: UUID(), url: shareURL)
|
||||
}
|
||||
})
|
||||
@ -137,7 +142,7 @@ import Utils
|
||||
self.viewModel = viewModel
|
||||
}
|
||||
|
||||
func setController(controller: PDFViewController) {
|
||||
func setController(controller: PDFViewController, dataService: DataService) {
|
||||
self.controller = controller
|
||||
|
||||
controller.pageIndexPublisher.sink { event in
|
||||
@ -146,7 +151,11 @@ import Utils
|
||||
if let totalPageCount = controller.document?.pageCount {
|
||||
let percent = min(100, max(0, ((Double(pageIndex) + 1.0) / Double(totalPageCount)) * 100.0))
|
||||
if percent > self.viewModel.pdfItem.readingProgress {
|
||||
self.viewModel.updateItemReadProgress(percent: percent, anchorIndex: pageIndex)
|
||||
self.viewModel.updateItemReadProgress(
|
||||
dataService: dataService,
|
||||
percent: percent,
|
||||
anchorIndex: pageIndex
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,7 +196,7 @@ import Utils
|
||||
return result
|
||||
}
|
||||
|
||||
func highlightSelection(pageView: PDFPageView, selectedText: String) -> String {
|
||||
func highlightSelection(pageView: PDFPageView, selectedText: String, dataService: DataService) -> String {
|
||||
let highlightID = UUID().uuidString.lowercased()
|
||||
let quote = quoteFromSelectedText(selectedText)
|
||||
let shortId = NanoID.generate(alphabet: NanoID.Alphabet.urlSafe.rawValue, size: 8)
|
||||
@ -208,7 +217,13 @@ import Utils
|
||||
|
||||
if let patchData = try? highlight.generateInstantJSON(), let patch = String(data: patchData, encoding: .utf8) {
|
||||
if overlapping.isEmpty {
|
||||
viewModel.createHighlight(shortId: shortId, highlightID: highlightID, quote: quote, patch: patch)
|
||||
viewModel.createHighlight(
|
||||
dataService: dataService,
|
||||
shortId: shortId,
|
||||
highlightID: highlightID,
|
||||
quote: quote,
|
||||
patch: patch
|
||||
)
|
||||
} else {
|
||||
let overlappingRects = overlapping.map(\.rects).compactMap { $0 }.flatMap { $0 }
|
||||
let rects = overlappingRects + (highlight.rects ?? [])
|
||||
@ -223,6 +238,7 @@ import Utils
|
||||
document.remove(annotations: overlapping + [highlight])
|
||||
|
||||
viewModel.mergeHighlight(
|
||||
dataService: dataService,
|
||||
shortId: shortId,
|
||||
highlightID: highlightID,
|
||||
quote: quote,
|
||||
@ -238,10 +254,13 @@ import Utils
|
||||
return shortId
|
||||
}
|
||||
|
||||
public func remove(annotations: [Annotation]?) {
|
||||
public func remove(dataService: DataService, annotations: [Annotation]?) {
|
||||
if let annotations = annotations {
|
||||
document.remove(annotations: annotations)
|
||||
viewModel.removeHighlights(highlightIds: highlightIds(annotations.compactMap { $0 as? HighlightAnnotation }))
|
||||
viewModel.removeHighlights(
|
||||
dataService: dataService,
|
||||
highlightIds: highlightIds(annotations.compactMap { $0 as? HighlightAnnotation })
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,10 +12,8 @@ public final class PDFViewerViewModel: ObservableObject {
|
||||
private var storedURL: URL?
|
||||
|
||||
var subscriptions = Set<AnyCancellable>()
|
||||
let services: Services
|
||||
|
||||
public init(services: Services, pdfItem: PDFItem) {
|
||||
self.services = services
|
||||
public init(pdfItem: PDFItem) {
|
||||
self.pdfItem = pdfItem
|
||||
}
|
||||
|
||||
@ -45,8 +43,14 @@ public final class PDFViewerViewModel: ObservableObject {
|
||||
onComplete(pdfItem.highlights.map { $0.patch ?? "" })
|
||||
}
|
||||
|
||||
public func createHighlight(shortId: String, highlightID: String, quote: String, patch: String) {
|
||||
_ = services.dataService.createHighlight(
|
||||
public func createHighlight(
|
||||
dataService: DataService,
|
||||
shortId: String,
|
||||
highlightID: String,
|
||||
quote: String,
|
||||
patch: String
|
||||
) {
|
||||
_ = dataService.createHighlight(
|
||||
shortId: shortId,
|
||||
highlightID: highlightID,
|
||||
quote: quote,
|
||||
@ -56,13 +60,14 @@ public final class PDFViewerViewModel: ObservableObject {
|
||||
}
|
||||
|
||||
public func mergeHighlight(
|
||||
dataService: DataService,
|
||||
shortId: String,
|
||||
highlightID: String,
|
||||
quote: String,
|
||||
patch: String,
|
||||
overlapHighlightIdList: [String]
|
||||
) {
|
||||
_ = services.dataService.mergeHighlights(
|
||||
_ = dataService.mergeHighlights(
|
||||
shortId: shortId,
|
||||
highlightID: highlightID,
|
||||
quote: quote,
|
||||
@ -72,25 +77,25 @@ public final class PDFViewerViewModel: ObservableObject {
|
||||
)
|
||||
}
|
||||
|
||||
public func removeHighlights(highlightIds: [String]) {
|
||||
public func removeHighlights(dataService: DataService, highlightIds: [String]) {
|
||||
highlightIds.forEach { highlightID in
|
||||
services.dataService.deleteHighlight(highlightID: highlightID)
|
||||
dataService.deleteHighlight(highlightID: highlightID)
|
||||
}
|
||||
}
|
||||
|
||||
public func updateItemReadProgress(percent: Double, anchorIndex: Int) {
|
||||
services.dataService.updateLinkReadingProgress(
|
||||
public func updateItemReadProgress(dataService: DataService, percent: Double, anchorIndex: Int) {
|
||||
dataService.updateLinkReadingProgress(
|
||||
itemID: pdfItem.itemID,
|
||||
readingProgress: percent,
|
||||
anchorIndex: anchorIndex
|
||||
)
|
||||
}
|
||||
|
||||
public func highlightShareURL(shortId: String) -> URL? {
|
||||
let baseURL = services.dataService.appEnvironment.serverBaseURL
|
||||
public func highlightShareURL(dataService: DataService, shortId: String) -> URL? {
|
||||
let baseURL = dataService.appEnvironment.serverBaseURL
|
||||
var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false)
|
||||
|
||||
if let username = services.dataService.currentViewer?.username {
|
||||
if let username = dataService.currentViewer?.username {
|
||||
components?.path = "/\(username)/\(pdfItem.slug)/highlights/\(shortId)"
|
||||
} else {
|
||||
return nil
|
||||
|
||||
@ -5,10 +5,6 @@ import SwiftUI
|
||||
import Utils
|
||||
import Views
|
||||
|
||||
enum PDFProvider {
|
||||
static var pdfViewerProvider: ((URL, PDFItem) -> AnyView)?
|
||||
}
|
||||
|
||||
@MainActor final class LinkItemDetailViewModel: ObservableObject {
|
||||
let pdfItem: PDFItem?
|
||||
let item: LinkedItem?
|
||||
@ -298,7 +294,7 @@ struct LinkItemDetailView: View {
|
||||
@ViewBuilder private var fixedNavBarReader: some View {
|
||||
if let pdfItem = viewModel.pdfItem, let pdfURL = pdfItem.pdfURL {
|
||||
#if os(iOS)
|
||||
PDFProvider.pdfViewerProvider?(pdfURL, pdfItem)
|
||||
PDFViewer(remoteURL: pdfURL, viewModel: PDFViewerViewModel(pdfItem: pdfItem))
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#elseif os(macOS)
|
||||
PDFWrapperView(pdfURL: pdfURL)
|
||||
|
||||
@ -6,20 +6,18 @@ import Views
|
||||
|
||||
public struct RootView: View {
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
let pdfViewerProvider: ((URL, PDFViewerViewModel) -> AnyView)?
|
||||
@StateObject private var viewModel = RootViewModel()
|
||||
|
||||
public init(
|
||||
pdfViewerProvider: ((URL, PDFViewerViewModel) -> AnyView)?,
|
||||
intercomProvider: IntercomProvider?
|
||||
) {
|
||||
self.pdfViewerProvider = pdfViewerProvider
|
||||
|
||||
public init(intercomProvider: IntercomProvider?) {
|
||||
if let intercomProvider = intercomProvider {
|
||||
DataService.showIntercomMessenger = intercomProvider.showIntercomMessenger
|
||||
DataService.registerIntercomUser = intercomProvider.registerIntercomUser
|
||||
Authenticator.unregisterIntercomUser = intercomProvider.unregisterIntercomUser
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
PDFReaderViewController.registerKey()
|
||||
#endif
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
@ -27,11 +25,6 @@ public struct RootView: View {
|
||||
.environmentObject(viewModel.services.authenticator)
|
||||
.environmentObject(viewModel.services.dataService)
|
||||
.environment(\.managedObjectContext, viewModel.services.dataService.viewContext)
|
||||
.onAppear {
|
||||
if let pdfViewerProvider = pdfViewerProvider {
|
||||
viewModel.configurePDFProvider(pdfViewerProvider: pdfViewerProvider)
|
||||
}
|
||||
}
|
||||
.onChange(of: scenePhase) { phase in
|
||||
if phase == .background {
|
||||
#if os(iOS)
|
||||
|
||||
@ -32,15 +32,6 @@ public final class RootViewModel: ObservableObject {
|
||||
#endif
|
||||
}
|
||||
|
||||
func configurePDFProvider(pdfViewerProvider: @escaping (URL, PDFViewerViewModel) -> AnyView) {
|
||||
guard PDFProvider.pdfViewerProvider == nil else { return }
|
||||
|
||||
PDFProvider.pdfViewerProvider = { [weak self] url, pdfItem in
|
||||
guard let self = self else { return AnyView(Text("")) }
|
||||
return pdfViewerProvider(url, PDFViewerViewModel(services: self.services, pdfItem: pdfItem))
|
||||
}
|
||||
}
|
||||
|
||||
func webAppWrapperViewModel(webLinkPath: String) -> WebAppWrapperViewModel {
|
||||
let baseURL = services.dataService.appEnvironment.webAppBaseURL
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ import SwiftUI
|
||||
import AppKit
|
||||
#elseif os(iOS)
|
||||
import Intercom
|
||||
import PSPDFKit
|
||||
import UIKit
|
||||
import Utils
|
||||
#endif
|
||||
@ -17,20 +16,12 @@ struct MainApp: App {
|
||||
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||
#elseif os(iOS)
|
||||
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||
|
||||
init() {
|
||||
// Activate PSPDFKit for app.omnivore.app
|
||||
if let pspdfKitKey = AppKeys.sharedInstance?.pspdfKitKey {
|
||||
SDK.setLicenseKey(pspdfKitKey)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
var body: some Scene {
|
||||
#if os(iOS)
|
||||
WindowGroup {
|
||||
RootView(
|
||||
pdfViewerProvider: pdfViewerProvider,
|
||||
intercomProvider: AppKeys.sharedInstance?.intercom != nil ? IntercomProvider(
|
||||
registerIntercomUser: { Intercom.registerUser(withUserId: $0) },
|
||||
unregisterIntercomUser: Intercom.logout,
|
||||
@ -40,12 +31,8 @@ struct MainApp: App {
|
||||
}
|
||||
#elseif os(macOS)
|
||||
WindowGroup {
|
||||
RootView(pdfViewerProvider: nil, intercomProvider: nil)
|
||||
RootView(intercomProvider: nil)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private func pdfViewerProvider(url: URL, viewModel: PDFViewerViewModel) -> AnyView {
|
||||
AnyView(PDFViewer(remoteURL: url, viewModel: viewModel))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user