From abeff164b97a798f9840fbf6d26c7902fd8112c7 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 5 Jun 2023 12:06:27 +0800 Subject: [PATCH] Some tweaks to Mac UI --- .../xcshareddata/swiftpm/Package.resolved | 9 --------- apple/OmnivoreKit/Package.swift | 4 ++-- .../Sources/App/Views/Home/HomeFeedViewMac.swift | 7 +++---- .../Sources/App/Views/WebReader/WebReaderContent.swift | 2 +- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved b/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved index 810d327ba..6dbd2dfbb 100644 --- a/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -153,15 +153,6 @@ "version" : "2.1.0" } }, - { - "identity" : "pspdfkit-sp", - "kind" : "remoteSourceControl", - "location" : "https://github.com/PSPDFKit/PSPDFKit-SP", - "state" : { - "revision" : "f4ba9790488b8f11c29cff35943e430efcdb8003", - "version" : "12.0.1" - } - }, { "identity" : "sovran-swift", "kind" : "remoteSourceControl", diff --git a/apple/OmnivoreKit/Package.swift b/apple/OmnivoreKit/Package.swift index 061a20464..317a42079 100644 --- a/apple/OmnivoreKit/Package.swift +++ b/apple/OmnivoreKit/Package.swift @@ -57,7 +57,7 @@ let package = Package( var appPackageDependencies: [Target.Dependency] { var deps: [Target.Dependency] = ["Views", "Services", "Models", "Utils"] // Comment out following line for macOS build - deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP")) + // deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP")) return deps } @@ -71,6 +71,6 @@ var dependencies: [Package.Dependency] { .package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.0.0") ] // Comment out following line for macOS build - deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1")) + // deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1")) return deps } diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift index fa14d1faf..1352f0f11 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift @@ -45,6 +45,7 @@ import Views item: item, viewModel: viewModel ) + .listRowInsets(EdgeInsets()) .contextMenu { Button( action: { viewModel.itemUnderTitleEdit = item }, @@ -91,11 +92,11 @@ import Views LoadingSection() } } - // .listStyle(PlainListStyle()) + .listStyle(InsetListStyle()) .navigationTitle("Home") .searchable( text: $viewModel.searchTerm, - placement: .sidebar + placement: .toolbar ) { if viewModel.searchTerm.isEmpty { Text(LocalText.inboxGeneric).searchCompletion("in:inbox ") @@ -105,8 +106,6 @@ import Views } } .onChange(of: viewModel.searchTerm) { _ in - // Maybe we should debounce this, but - // it feels like it works ok without loadItems(isRefresh: true) } .onSubmit(of: .search) { diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift index 232ecd896..6cb9956f0 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift @@ -81,7 +81,7 @@ struct WebReaderContent { title: `\(articleContent.title.replacingOccurrences(of: "`", with: "\\`"))`, content: document.getElementById('_omnivore-htmlContent').innerHTML, originalArticleUrl: "\(item.unwrappedPageURLString)", - contentReader: "WEB", + contentReader: "\(item.contentReader ?? "WEB")", readingProgressPercent: \(item.readingProgress), readingProgressAnchorIndex: \(item.readingProgressAnchor), labels: \(item.labelsJSONString),