From 6be14a099b5b8dbed059954972b6e5dc4fb2da50 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Wed, 12 Aug 2020 16:25:53 +0800 Subject: [PATCH 01/15] Adds RS* packages to ios-multiplatform this allows it to build for physical devices --- NetNewsWire.xcodeproj/project.pbxproj | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index e49f15856..0c1d3ab89 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -44,6 +44,16 @@ 1799E6CE24C320D600511E91 /* InspectorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1799E6CC24C320D600511E91 /* InspectorModel.swift */; }; 179DB1DFBCF9177104B12E0F /* AccountsNewsBlurWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179DBBA2B22A659F81EED6F9 /* AccountsNewsBlurWindowController.swift */; }; 179DB3CE822BFCC2D774D9F4 /* AccountsNewsBlurWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179DBBA2B22A659F81EED6F9 /* AccountsNewsBlurWindowController.swift */; }; + 17A1597C24E3DEDD005DA32A /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 17A1597B24E3DEDD005DA32A /* RSCore */; }; + 17A1597D24E3DEDD005DA32A /* RSCore in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1597B24E3DEDD005DA32A /* RSCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 17A1597F24E3DEDD005DA32A /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 17A1597E24E3DEDD005DA32A /* RSTree */; }; + 17A1598024E3DEDD005DA32A /* RSTree in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1597E24E3DEDD005DA32A /* RSTree */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 17A1598224E3DEDD005DA32A /* RSWeb in Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598124E3DEDD005DA32A /* RSWeb */; }; + 17A1598324E3DEDD005DA32A /* RSWeb in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598124E3DEDD005DA32A /* RSWeb */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 17A1598524E3DEDD005DA32A /* RSDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598424E3DEDD005DA32A /* RSDatabase */; }; + 17A1598624E3DEDD005DA32A /* RSDatabase in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598424E3DEDD005DA32A /* RSDatabase */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 17A1598824E3DEDD005DA32A /* RSParser in Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598724E3DEDD005DA32A /* RSParser */; }; + 17A1598924E3DEDD005DA32A /* RSParser in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598724E3DEDD005DA32A /* RSParser */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 17D232A824AFF10A0005F075 /* AddWebFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */; }; 17D232A924AFF10A0005F075 /* AddWebFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */; }; 17D5F17124B0BC6700375168 /* SidebarToolbarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D5F17024B0BC6700375168 /* SidebarToolbarModel.swift */; }; @@ -1294,6 +1304,11 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 17A1598924E3DEDD005DA32A /* RSParser in Embed Frameworks */, + 17A1598624E3DEDD005DA32A /* RSDatabase in Embed Frameworks */, + 17A1598324E3DEDD005DA32A /* RSWeb in Embed Frameworks */, + 17A1597D24E3DEDD005DA32A /* RSCore in Embed Frameworks */, + 17A1598024E3DEDD005DA32A /* RSTree in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -1998,7 +2013,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 17A1598224E3DEDD005DA32A /* RSWeb in Frameworks */, + 17A1597F24E3DEDD005DA32A /* RSTree in Frameworks */, + 17A1598824E3DEDD005DA32A /* RSParser in Frameworks */, + 17A1597C24E3DEDD005DA32A /* RSCore in Frameworks */, 516B695D24D2F28E00B5702F /* Account in Frameworks */, + 17A1598524E3DEDD005DA32A /* RSDatabase in Frameworks */, 51E4989724A8065700B667CB /* CloudKit.framework in Frameworks */, 51E4989924A8067000B667CB /* WebKit.framework in Frameworks */, ); @@ -3577,6 +3597,11 @@ name = "Multiplatform iOS"; packageProductDependencies = ( 516B695C24D2F28E00B5702F /* Account */, + 17A1597B24E3DEDD005DA32A /* RSCore */, + 17A1597E24E3DEDD005DA32A /* RSTree */, + 17A1598124E3DEDD005DA32A /* RSWeb */, + 17A1598424E3DEDD005DA32A /* RSDatabase */, + 17A1598724E3DEDD005DA32A /* RSParser */, ); productName = iOS; productReference = 51C0513D24A77DF800194D5E /* NetNewsWire.app */; @@ -5734,6 +5759,31 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 17A1597B24E3DEDD005DA32A /* RSCore */ = { + isa = XCSwiftPackageProductDependency; + package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; + productName = RSCore; + }; + 17A1597E24E3DEDD005DA32A /* RSTree */ = { + isa = XCSwiftPackageProductDependency; + package = 510ECA4024D1DCD0001C31A6 /* XCRemoteSwiftPackageReference "RSTree" */; + productName = RSTree; + }; + 17A1598124E3DEDD005DA32A /* RSWeb */ = { + isa = XCSwiftPackageProductDependency; + package = 51383A3024D1F90E0027E272 /* XCRemoteSwiftPackageReference "RSWeb" */; + productName = RSWeb; + }; + 17A1598424E3DEDD005DA32A /* RSDatabase */ = { + isa = XCSwiftPackageProductDependency; + package = 51B0DF0D24D24E3B000AD99E /* XCRemoteSwiftPackageReference "RSDatabase" */; + productName = RSDatabase; + }; + 17A1598724E3DEDD005DA32A /* RSParser */ = { + isa = XCSwiftPackageProductDependency; + package = 51B0DF2324D2C7FA000AD99E /* XCRemoteSwiftPackageReference "RSParser" */; + productName = RSParser; + }; 5102AE6824D17F7C0050839C /* RSCore */ = { isa = XCSwiftPackageProductDependency; package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; From 646a3190e54589221da418d0603529ea3f53a763 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Wed, 12 Aug 2020 18:12:21 +0800 Subject: [PATCH 02/15] Fixes #2280 --- .../Shared/Timeline/TimelineToolbarModifier.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Multiplatform/Shared/Timeline/TimelineToolbarModifier.swift b/Multiplatform/Shared/Timeline/TimelineToolbarModifier.swift index 1d8445220..59329427f 100644 --- a/Multiplatform/Shared/Timeline/TimelineToolbarModifier.swift +++ b/Multiplatform/Shared/Timeline/TimelineToolbarModifier.swift @@ -12,6 +12,10 @@ struct TimelineToolbarModifier: ViewModifier { @EnvironmentObject private var sceneModel: SceneModel @EnvironmentObject private var timelineModel: TimelineModel + @Environment(\.presentationMode) var presentationMode + #if os(iOS) + @Environment(\.horizontalSizeClass) private var horizontalSizeClass + #endif @State private var isReadFiltered: Bool? = nil func body(content: Content) -> some View { @@ -40,6 +44,11 @@ struct TimelineToolbarModifier: ViewModifier { ToolbarItem(placement: .bottomBar) { Button { sceneModel.markAllAsRead() + #if os(iOS) + if horizontalSizeClass == .compact { + presentationMode.wrappedValue.dismiss() + } + #endif } label: { AppAssets.markAllAsReadImage } From 3ae4a85969b1b32de4ad731d573e04b2e199d811 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Wed, 12 Aug 2020 21:04:56 +0800 Subject: [PATCH 03/15] Removes @ViewBuilder from `var body` --- Multiplatform/Shared/Add/AddFolderView.swift | 2 +- Multiplatform/Shared/Add/AddWebFeedView.swift | 2 +- Multiplatform/Shared/Article/ArticleContainerView.swift | 2 +- Multiplatform/Shared/Images/IconImageView.swift | 2 +- Multiplatform/Shared/Sidebar/SidebarContainerView.swift | 2 +- Multiplatform/Shared/Sidebar/SidebarContextMenu.swift | 2 +- Multiplatform/Shared/Sidebar/SidebarView.swift | 4 ++-- Multiplatform/Shared/Timeline/TimelineContainerView.swift | 2 +- Multiplatform/Shared/Timeline/TimelineContextMenu.swift | 2 +- Multiplatform/Shared/Timeline/TimelineView.swift | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Multiplatform/Shared/Add/AddFolderView.swift b/Multiplatform/Shared/Add/AddFolderView.swift index 44152d382..b6c145b3a 100644 --- a/Multiplatform/Shared/Add/AddFolderView.swift +++ b/Multiplatform/Shared/Add/AddFolderView.swift @@ -15,7 +15,7 @@ struct AddFolderView: View { @Environment(\.presentationMode) private var presentationMode @ObservedObject private var viewModel = AddFolderModel() - @ViewBuilder var body: some View { + var body: some View { #if os(iOS) iosForm .onReceive(viewModel.$shouldDismiss, perform: { diff --git a/Multiplatform/Shared/Add/AddWebFeedView.swift b/Multiplatform/Shared/Add/AddWebFeedView.swift index fd3e62d09..1dc35b3f4 100644 --- a/Multiplatform/Shared/Add/AddWebFeedView.swift +++ b/Multiplatform/Shared/Add/AddWebFeedView.swift @@ -16,7 +16,7 @@ struct AddWebFeedView: View { @Environment(\.presentationMode) private var presentationMode @StateObject private var viewModel = AddWebFeedModel() - @ViewBuilder var body: some View { + var body: some View { #if os(iOS) iosForm .onAppear { diff --git a/Multiplatform/Shared/Article/ArticleContainerView.swift b/Multiplatform/Shared/Article/ArticleContainerView.swift index 4f18e743c..07fa53b72 100644 --- a/Multiplatform/Shared/Article/ArticleContainerView.swift +++ b/Multiplatform/Shared/Article/ArticleContainerView.swift @@ -11,7 +11,7 @@ import Articles struct ArticleContainerView: View { - @ViewBuilder var body: some View { + var body: some View { ArticleView() .modifier(ArticleToolbarModifier()) } diff --git a/Multiplatform/Shared/Images/IconImageView.swift b/Multiplatform/Shared/Images/IconImageView.swift index 61c067762..822b3a7ad 100644 --- a/Multiplatform/Shared/Images/IconImageView.swift +++ b/Multiplatform/Shared/Images/IconImageView.swift @@ -13,7 +13,7 @@ struct IconImageView: View { @Environment(\.colorScheme) var colorScheme var iconImage: IconImage - @ViewBuilder var body: some View { + var body: some View { GeometryReader { proxy in let newSize = newImageSize(viewSize: proxy.size) diff --git a/Multiplatform/Shared/Sidebar/SidebarContainerView.swift b/Multiplatform/Shared/Sidebar/SidebarContainerView.swift index 611263879..4be6cdc71 100644 --- a/Multiplatform/Shared/Sidebar/SidebarContainerView.swift +++ b/Multiplatform/Shared/Sidebar/SidebarContainerView.swift @@ -15,7 +15,7 @@ struct SidebarContainerView: View { @State var sidebarItems = [SidebarItem]() - @ViewBuilder var body: some View { + var body: some View { SidebarView(sidebarItems: $sidebarItems) .modifier(SidebarToolbarModifier()) .modifier(SidebarListStyleModifier()) diff --git a/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift b/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift index f98146993..148571f06 100644 --- a/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift +++ b/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift @@ -19,7 +19,7 @@ struct SidebarContextMenu: View { var sidebarItem: SidebarItem - @ViewBuilder var body: some View { + var body: some View { // MARK: Account Context Menu if sidebarItem.representedType == .account { Button { diff --git a/Multiplatform/Shared/Sidebar/SidebarView.swift b/Multiplatform/Shared/Sidebar/SidebarView.swift index f75d3a122..41e3396f5 100644 --- a/Multiplatform/Shared/Sidebar/SidebarView.swift +++ b/Multiplatform/Shared/Sidebar/SidebarView.swift @@ -26,7 +26,7 @@ struct SidebarView: View { @State var pulling: Bool = false @State var refreshing: Bool = false - @ViewBuilder var body: some View { + var body: some View { #if os(macOS) VStack { HStack { @@ -182,7 +182,7 @@ struct SidebarView: View { @EnvironmentObject private var sidebarModel: SidebarModel var sidebarItem: SidebarItem - @ViewBuilder var body: some View { + var body: some View { #if os(macOS) SidebarItemView(sidebarItem: sidebarItem) .tag(sidebarItem.feed!.feedID!) diff --git a/Multiplatform/Shared/Timeline/TimelineContainerView.swift b/Multiplatform/Shared/Timeline/TimelineContainerView.swift index 1b8706b05..70f8de1b8 100644 --- a/Multiplatform/Shared/Timeline/TimelineContainerView.swift +++ b/Multiplatform/Shared/Timeline/TimelineContainerView.swift @@ -17,7 +17,7 @@ struct TimelineContainerView: View { @State private var timelineItems = TimelineItems() @State private var isReadFiltered: Bool? = nil - @ViewBuilder var body: some View { + var body: some View { TimelineView(timelineItems: $timelineItems, isReadFiltered: $isReadFiltered) .modifier(TimelineToolbarModifier()) .environmentObject(sceneModel.timelineModel) diff --git a/Multiplatform/Shared/Timeline/TimelineContextMenu.swift b/Multiplatform/Shared/Timeline/TimelineContextMenu.swift index e911bc36d..96e49c9e0 100644 --- a/Multiplatform/Shared/Timeline/TimelineContextMenu.swift +++ b/Multiplatform/Shared/Timeline/TimelineContextMenu.swift @@ -13,7 +13,7 @@ struct TimelineContextMenu: View { @EnvironmentObject private var timelineModel: TimelineModel var timelineItem: TimelineItem - @ViewBuilder var body: some View { + var body: some View { if timelineModel.canMarkIndicatedArticlesAsRead(timelineItem) { Button { diff --git a/Multiplatform/Shared/Timeline/TimelineView.swift b/Multiplatform/Shared/Timeline/TimelineView.swift index 714d5e51b..34a0a2421 100644 --- a/Multiplatform/Shared/Timeline/TimelineView.swift +++ b/Multiplatform/Shared/Timeline/TimelineView.swift @@ -17,7 +17,7 @@ struct TimelineView: View { @State private var timelineItemFrames = [String: CGRect]() - @ViewBuilder var body: some View { + var body: some View { GeometryReader { geometryReaderProxy in #if os(macOS) VStack { From cacc96fa5e35fea110705c9724bfc6e32b237d4e Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Wed, 12 Aug 2020 21:44:46 +0800 Subject: [PATCH 04/15] Code alignment. --- Multiplatform/Shared/SceneNavigationView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Multiplatform/Shared/SceneNavigationView.swift b/Multiplatform/Shared/SceneNavigationView.swift index da2d1211b..dac1dfa88 100644 --- a/Multiplatform/Shared/SceneNavigationView.swift +++ b/Multiplatform/Shared/SceneNavigationView.swift @@ -30,7 +30,7 @@ struct SceneNavigationView: View { SidebarContainerView() .frame(minWidth: 100, idealWidth: 150, maxHeight: .infinity) #else - SidebarContainerView() + SidebarContainerView() #endif #if os(iOS) From f1e3a19804347860bd06b90ed6323d3fc056c903 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 08:24:54 +0800 Subject: [PATCH 05/15] Fixes #291 Release notes added to Settings (iOS) and Help Menu (macOS) --- Multiplatform/Shared/MainApp.swift | 6 ++++ .../Shared/Release Notes/ReleaseNotes.swift | 32 +++++++++++++++++++ .../iOS/Settings/SettingsModel.swift | 4 ++- Multiplatform/iOS/Settings/SettingsView.swift | 3 ++ NetNewsWire.xcodeproj/project.pbxproj | 14 ++++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 Multiplatform/Shared/Release Notes/ReleaseNotes.swift diff --git a/Multiplatform/Shared/MainApp.swift b/Multiplatform/Shared/MainApp.swift index 7d987072d..b6d4bbc40 100644 --- a/Multiplatform/Shared/MainApp.swift +++ b/Multiplatform/Shared/MainApp.swift @@ -73,6 +73,12 @@ struct MainApp: App { Button("Open in Browser", action: {}) .keyboardShortcut(.rightArrow, modifiers: [.command]) }) + CommandGroup(after: .help, addition: { + Button("Release Notes", action: { + NSWorkspace.shared.open(ReleaseNotes().url) + }) + .keyboardShortcut("V", modifiers: [.shift, .command]) + }) } // Mac Preferences diff --git a/Multiplatform/Shared/Release Notes/ReleaseNotes.swift b/Multiplatform/Shared/Release Notes/ReleaseNotes.swift new file mode 100644 index 000000000..f5cda3473 --- /dev/null +++ b/Multiplatform/Shared/Release Notes/ReleaseNotes.swift @@ -0,0 +1,32 @@ +// +// ReleaseNotes.swift +// NetNewsWire +// +// Created by Stuart Breckenridge on 13/8/20. +// Copyright © 2020 Ranchero Software. All rights reserved. +// + +import Foundation + +struct ReleaseNotes { + + var url: URL { + var gitHub = "https://github.com/Ranchero-Software/NetNewsWire/releases/tag/" + #if os(macOS) + gitHub += "mac-\(String(describing: versionString()))" + return URL(string: gitHub)! + #else + gitHub += "ios-\(String(describing: versionString()))-\(String(describing: buildVersionString()))" + return URL(string: gitHub)! + #endif + } + + private func versionString() -> String { + Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "" + } + + private func buildVersionString() -> String { + Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "" + } + +} diff --git a/Multiplatform/iOS/Settings/SettingsModel.swift b/Multiplatform/iOS/Settings/SettingsModel.swift index 382be4e62..2710601bd 100644 --- a/Multiplatform/iOS/Settings/SettingsModel.swift +++ b/Multiplatform/iOS/Settings/SettingsModel.swift @@ -12,7 +12,7 @@ import Account class SettingsModel: ObservableObject { enum HelpSites { - case netNewsWireHelp, netNewsWire, supportNetNewsWire, github, bugTracker, technotes, netNewsWireSlack, none + case netNewsWireHelp, netNewsWire, supportNetNewsWire, github, bugTracker, technotes, netNewsWireSlack, releaseNotes, none var url: URL? { switch self { @@ -30,6 +30,8 @@ class SettingsModel: ObservableObject { return URL(string: "https://github.com/brentsimmons/NetNewsWire/tree/main/Technotes")! case .netNewsWireSlack: return URL(string: "https://ranchero.com/netnewswire/slack")! + case .releaseNotes: + return ReleaseNotes().url case .none: return nil } diff --git a/Multiplatform/iOS/Settings/SettingsView.swift b/Multiplatform/iOS/Settings/SettingsView.swift index ad4dbad45..3ba8de30b 100644 --- a/Multiplatform/iOS/Settings/SettingsView.swift +++ b/Multiplatform/iOS/Settings/SettingsView.swift @@ -203,6 +203,9 @@ struct SettingsView: View { Button("NetNewsWire Slack", action: { viewModel.selectedWebsite = .netNewsWireSlack }).foregroundColor(.primary) + Button("Release Notes", action: { + viewModel.selectedWebsite = .releaseNotes + }).foregroundColor(.primary) NavigationLink( destination: SettingsAboutView(), label: { diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 0c1d3ab89..fda989d4a 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -54,6 +54,8 @@ 17A1598624E3DEDD005DA32A /* RSDatabase in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598424E3DEDD005DA32A /* RSDatabase */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 17A1598824E3DEDD005DA32A /* RSParser in Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598724E3DEDD005DA32A /* RSParser */; }; 17A1598924E3DEDD005DA32A /* RSParser in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 17A1598724E3DEDD005DA32A /* RSParser */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 17AC0ABB24E4B65E004C1231 /* ReleaseNotes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17AC0ABA24E4B65E004C1231 /* ReleaseNotes.swift */; }; + 17AC0ABC24E4B65E004C1231 /* ReleaseNotes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17AC0ABA24E4B65E004C1231 /* ReleaseNotes.swift */; }; 17D232A824AFF10A0005F075 /* AddWebFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */; }; 17D232A924AFF10A0005F075 /* AddWebFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */; }; 17D5F17124B0BC6700375168 /* SidebarToolbarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D5F17024B0BC6700375168 /* SidebarToolbarModel.swift */; }; @@ -1439,6 +1441,7 @@ 1799E6A824C2F93F00511E91 /* InspectorPlatformModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectorPlatformModifier.swift; sourceTree = ""; }; 1799E6CC24C320D600511E91 /* InspectorModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectorModel.swift; sourceTree = ""; }; 179DBBA2B22A659F81EED6F9 /* AccountsNewsBlurWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountsNewsBlurWindowController.swift; sourceTree = ""; }; + 17AC0ABA24E4B65E004C1231 /* ReleaseNotes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReleaseNotes.swift; sourceTree = ""; }; 17B223DB24AC24D2001E4592 /* TimelineLayoutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineLayoutView.swift; sourceTree = ""; }; 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWebFeedModel.swift; sourceTree = ""; }; 17D5F17024B0BC6700375168 /* SidebarToolbarModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarToolbarModel.swift; sourceTree = ""; }; @@ -2231,6 +2234,14 @@ path = Add; sourceTree = ""; }; + 17AC0ACB24E4B66A004C1231 /* Release Notes */ = { + isa = PBXGroup; + children = ( + 17AC0ABA24E4B65E004C1231 /* ReleaseNotes.swift */, + ); + path = "Release Notes"; + sourceTree = ""; + }; 510289CE2451BA1E00426DDF /* Twitter */ = { isa = PBXGroup; children = ( @@ -2634,6 +2645,7 @@ 514E6C0424AD2B0400AC6F6E /* SwiftUI Extensions */, 51919FCB24AB855000541E64 /* Timeline */, 171BCBB124CBD569006E22D9 /* Account Management */, + 17AC0ACB24E4B66A004C1231 /* Release Notes */, ); path = Shared; sourceTree = ""; @@ -4447,6 +4459,7 @@ 51E4991724A8090400B667CB /* ArticleUtilities.swift in Sources */, 51E4991B24A8091000B667CB /* IconImage.swift in Sources */, 51E4995424A8734D00B667CB /* ExtensionPointIdentifer.swift in Sources */, + 17AC0ABB24E4B65E004C1231 /* ReleaseNotes.swift in Sources */, 51E4996924A8760C00B667CB /* ArticleStylesManager.swift in Sources */, 5177471E24B387E100EB0F74 /* ImageTransition.swift in Sources */, 51E498F324A8085D00B667CB /* PseudoFeed.swift in Sources */, @@ -4662,6 +4675,7 @@ 51E4990724A808C300B667CB /* AuthorAvatarDownloader.swift in Sources */, 51E4997424A8784400B667CB /* DefaultFeedsImporter.swift in Sources */, 51919FF524AB869C00541E64 /* TimelineItem.swift in Sources */, + 17AC0ABC24E4B65E004C1231 /* ReleaseNotes.swift in Sources */, 51E4992024A8095000B667CB /* RSImage-Extensions.swift in Sources */, 51E499FE24A9137600B667CB /* SidebarModel.swift in Sources */, 51E498FE24A808BA00B667CB /* FaviconDownloader.swift in Sources */, From 264cc6c87c3277e235ef46d9510c1b8679b74232 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 09:20:12 +0800 Subject: [PATCH 06/15] Removed build version from release notes url --- Multiplatform/Shared/Release Notes/ReleaseNotes.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Multiplatform/Shared/Release Notes/ReleaseNotes.swift b/Multiplatform/Shared/Release Notes/ReleaseNotes.swift index f5cda3473..d9a91fbba 100644 --- a/Multiplatform/Shared/Release Notes/ReleaseNotes.swift +++ b/Multiplatform/Shared/Release Notes/ReleaseNotes.swift @@ -16,7 +16,7 @@ struct ReleaseNotes { gitHub += "mac-\(String(describing: versionString()))" return URL(string: gitHub)! #else - gitHub += "ios-\(String(describing: versionString()))-\(String(describing: buildVersionString()))" + gitHub += "ios-\(String(describing: versionString()))" return URL(string: gitHub)! #endif } @@ -24,9 +24,5 @@ struct ReleaseNotes { private func versionString() -> String { Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "" } - - private func buildVersionString() -> String { - Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "" - } } From 13e28f6f3f60444a6fb44e67ac140e0f9f24fc20 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 09:28:11 +0800 Subject: [PATCH 07/15] Removed force unwrapping --- Multiplatform/iOS/Settings/SettingsView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Multiplatform/iOS/Settings/SettingsView.swift b/Multiplatform/iOS/Settings/SettingsView.swift index 3ba8de30b..e021262eb 100644 --- a/Multiplatform/iOS/Settings/SettingsView.swift +++ b/Multiplatform/iOS/Settings/SettingsView.swift @@ -216,9 +216,8 @@ struct SettingsView: View { } private func appVersion() -> String { - let dict = NSDictionary(contentsOf: Bundle.main.url(forResource: "Info", withExtension: "plist")!) - let version = dict?.object(forKey: "CFBundleShortVersionString") as? String ?? "" - let build = dict?.object(forKey: "CFBundleVersion") as? String ?? "" + let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "" + let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "" return "NetNewsWire \(version) (Build \(build))" } From ffc5978a82dddd05adb3fd6ff0f0b47361302b21 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 12:20:22 +0800 Subject: [PATCH 08/15] Fixes add account sheet sizing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Picker images don’t resize so they’ve been commented out --- .../AccountsPreferencesView.swift | 2 + .../Add Account/AddAccountPickerRow.swift | 12 ++-- .../Add Account/AddAccountView.swift | 59 +++++++++---------- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/AccountsPreferencesView.swift b/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/AccountsPreferencesView.swift index 20261fb98..67236d1c7 100644 --- a/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/AccountsPreferencesView.swift +++ b/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/AccountsPreferencesView.swift @@ -31,6 +31,8 @@ struct AccountsPreferencesView: View { switch viewModel.sheetToShow { case .add: AddAccountView(preferencesModel: viewModel) + .frame(width: 300, height: 200) + .padding() case .credentials: EditAccountCredentialsView(viewModel: viewModel) case .none: diff --git a/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountPickerRow.swift b/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountPickerRow.swift index 3a3f29153..23366ac85 100644 --- a/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountPickerRow.swift +++ b/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountPickerRow.swift @@ -15,12 +15,12 @@ struct AddAccountPickerRow: View { var body: some View { HStack { - if let img = AppAssets.image(for: accountType) { - Image(rsImage: img) - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 15, height: 15) - } +// if let img = AppAssets.image(for: accountType) { +// Image(rsImage: img) +// .resizable() +// .aspectRatio(contentMode: .fit) +// .frame(width: 15, height: 15) +// } switch accountType { case .onMyMac: diff --git a/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountView.swift b/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountView.swift index b9267b6d0..026aa0671 100644 --- a/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountView.swift +++ b/Multiplatform/macOS/Preferences/Preference Panes/Accounts/Account Preferences/Add Account/AddAccountView.swift @@ -16,36 +16,35 @@ struct AddAccountView: View { @StateObject private var viewModel = AddAccountModel() var body: some View { - - VStack(alignment: .leading) { + + Form { Text("Add an Account").font(.headline) - Form { - Picker("Account Type", - selection: $viewModel.selectedAddAccount, - content: { - ForEach(0.. Date: Thu, 13 Aug 2020 17:22:46 +0800 Subject: [PATCH 09/15] Adds SPM packages to multiplatform mac it can now be archived --- NetNewsWire.xcodeproj/project.pbxproj | 78 +++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index fda989d4a..f4ee0ead4 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -7,6 +7,21 @@ objects = { /* Begin PBXBuildFile section */ + 1704050F24E53D6200A00787 /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 1704050E24E53D6200A00787 /* RSCore */; }; + 1704051024E53D6200A00787 /* RSCore in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704050E24E53D6200A00787 /* RSCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1704051224E53D6200A00787 /* RSCoreResources in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051124E53D6200A00787 /* RSCoreResources */; }; + 1704051424E53D6200A00787 /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051324E53D6200A00787 /* RSTree */; }; + 1704051524E53D6200A00787 /* RSTree in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051324E53D6200A00787 /* RSTree */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1704051724E53D6200A00787 /* RSWeb in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051624E53D6200A00787 /* RSWeb */; }; + 1704051824E53D6200A00787 /* RSWeb in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051624E53D6200A00787 /* RSWeb */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1704051A24E53D6200A00787 /* RSDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051924E53D6200A00787 /* RSDatabase */; }; + 1704051B24E53D6200A00787 /* RSDatabase in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051924E53D6200A00787 /* RSDatabase */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1704051D24E53D6200A00787 /* RSDatabaseObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051C24E53D6200A00787 /* RSDatabaseObjC */; }; + 1704051E24E53D6200A00787 /* RSDatabaseObjC in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051C24E53D6200A00787 /* RSDatabaseObjC */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1704052024E53D6200A00787 /* RSParser in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051F24E53D6200A00787 /* RSParser */; }; + 1704052124E53D6200A00787 /* RSParser in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051F24E53D6200A00787 /* RSParser */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1704052324E53D6200A00787 /* RSParserObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 1704052224E53D6200A00787 /* RSParserObjC */; }; + 1704052424E53D6200A00787 /* RSParserObjC in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704052224E53D6200A00787 /* RSParserObjC */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 1717535624BADF33004498C6 /* GeneralPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1717535524BADF33004498C6 /* GeneralPreferencesModel.swift */; }; 171BCB8C24CB08A3006E22D9 /* FixAccountCredentialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */; }; 171BCB8D24CB08A3006E22D9 /* FixAccountCredentialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */; }; @@ -1321,7 +1336,14 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 1704051E24E53D6200A00787 /* RSDatabaseObjC in Embed Frameworks */, + 1704051B24E53D6200A00787 /* RSDatabase in Embed Frameworks */, + 1704051824E53D6200A00787 /* RSWeb in Embed Frameworks */, + 1704051024E53D6200A00787 /* RSCore in Embed Frameworks */, + 1704052424E53D6200A00787 /* RSParserObjC in Embed Frameworks */, 51E4997724A87FFC00B667CB /* Sparkle.framework in Embed Frameworks */, + 1704052124E53D6200A00787 /* RSParser in Embed Frameworks */, + 1704051524E53D6200A00787 /* RSTree in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -2031,10 +2053,18 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 1704052324E53D6200A00787 /* RSParserObjC in Frameworks */, + 1704051724E53D6200A00787 /* RSWeb in Frameworks */, + 1704052024E53D6200A00787 /* RSParser in Frameworks */, + 1704050F24E53D6200A00787 /* RSCore in Frameworks */, 516B695B24D2F28600B5702F /* Account in Frameworks */, 51E4997624A87FFC00B667CB /* Sparkle.framework in Frameworks */, + 1704051424E53D6200A00787 /* RSTree in Frameworks */, 51E498B124A806A400B667CB /* CloudKit.framework in Frameworks */, + 1704051224E53D6200A00787 /* RSCoreResources in Frameworks */, 51E498B324A806AA00B667CB /* WebKit.framework in Frameworks */, + 1704051D24E53D6200A00787 /* RSDatabaseObjC in Frameworks */, + 1704051A24E53D6200A00787 /* RSDatabase in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3636,6 +3666,14 @@ name = "Multiplatform macOS"; packageProductDependencies = ( 516B695A24D2F28600B5702F /* Account */, + 1704050E24E53D6200A00787 /* RSCore */, + 1704051124E53D6200A00787 /* RSCoreResources */, + 1704051324E53D6200A00787 /* RSTree */, + 1704051624E53D6200A00787 /* RSWeb */, + 1704051924E53D6200A00787 /* RSDatabase */, + 1704051C24E53D6200A00787 /* RSDatabaseObjC */, + 1704051F24E53D6200A00787 /* RSParser */, + 1704052224E53D6200A00787 /* RSParserObjC */, ); productName = macOS; productReference = 51C0514424A77DF800194D5E /* NetNewsWire.app */; @@ -5773,6 +5811,46 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 1704050E24E53D6200A00787 /* RSCore */ = { + isa = XCSwiftPackageProductDependency; + package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; + productName = RSCore; + }; + 1704051124E53D6200A00787 /* RSCoreResources */ = { + isa = XCSwiftPackageProductDependency; + package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; + productName = RSCoreResources; + }; + 1704051324E53D6200A00787 /* RSTree */ = { + isa = XCSwiftPackageProductDependency; + package = 510ECA4024D1DCD0001C31A6 /* XCRemoteSwiftPackageReference "RSTree" */; + productName = RSTree; + }; + 1704051624E53D6200A00787 /* RSWeb */ = { + isa = XCSwiftPackageProductDependency; + package = 51383A3024D1F90E0027E272 /* XCRemoteSwiftPackageReference "RSWeb" */; + productName = RSWeb; + }; + 1704051924E53D6200A00787 /* RSDatabase */ = { + isa = XCSwiftPackageProductDependency; + package = 51B0DF0D24D24E3B000AD99E /* XCRemoteSwiftPackageReference "RSDatabase" */; + productName = RSDatabase; + }; + 1704051C24E53D6200A00787 /* RSDatabaseObjC */ = { + isa = XCSwiftPackageProductDependency; + package = 51B0DF0D24D24E3B000AD99E /* XCRemoteSwiftPackageReference "RSDatabase" */; + productName = RSDatabaseObjC; + }; + 1704051F24E53D6200A00787 /* RSParser */ = { + isa = XCSwiftPackageProductDependency; + package = 51B0DF2324D2C7FA000AD99E /* XCRemoteSwiftPackageReference "RSParser" */; + productName = RSParser; + }; + 1704052224E53D6200A00787 /* RSParserObjC */ = { + isa = XCSwiftPackageProductDependency; + package = 51B0DF2324D2C7FA000AD99E /* XCRemoteSwiftPackageReference "RSParser" */; + productName = RSParserObjC; + }; 17A1597B24E3DEDD005DA32A /* RSCore */ = { isa = XCSwiftPackageProductDependency; package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; From de590248b3153e1f16cea6377e758fd10ed075db Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 19:16:17 +0800 Subject: [PATCH 10/15] Fixes inspector sizing and removes kb shortcuts --- Multiplatform/Shared/Inspector/InspectorView.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Multiplatform/Shared/Inspector/InspectorView.swift b/Multiplatform/Shared/Inspector/InspectorView.swift index 04c20395b..2ce26c2a3 100644 --- a/Multiplatform/Shared/Inspector/InspectorView.swift +++ b/Multiplatform/Shared/Inspector/InspectorView.swift @@ -127,11 +127,12 @@ struct InspectorView: View { Spacer() Button("Cancel", action: { presentationMode.wrappedValue.dismiss() - }).keyboardShortcut(.cancelAction) + }) Button("Done", action: { inspectorModel.shouldUpdate = true - }).keyboardShortcut(.defaultAction) - }.padding(.top) + }) + + }.padding([.top, .bottom]) #endif } .onAppear { From 618c835183ec3bc496369b1b534820608ce5fb33 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 19:56:53 +0800 Subject: [PATCH 11/15] Removes RS packages --- NetNewsWire.xcodeproj/project.pbxproj | 78 --------------------------- 1 file changed, 78 deletions(-) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index f4ee0ead4..fda989d4a 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -7,21 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 1704050F24E53D6200A00787 /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 1704050E24E53D6200A00787 /* RSCore */; }; - 1704051024E53D6200A00787 /* RSCore in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704050E24E53D6200A00787 /* RSCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1704051224E53D6200A00787 /* RSCoreResources in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051124E53D6200A00787 /* RSCoreResources */; }; - 1704051424E53D6200A00787 /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051324E53D6200A00787 /* RSTree */; }; - 1704051524E53D6200A00787 /* RSTree in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051324E53D6200A00787 /* RSTree */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1704051724E53D6200A00787 /* RSWeb in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051624E53D6200A00787 /* RSWeb */; }; - 1704051824E53D6200A00787 /* RSWeb in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051624E53D6200A00787 /* RSWeb */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1704051A24E53D6200A00787 /* RSDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051924E53D6200A00787 /* RSDatabase */; }; - 1704051B24E53D6200A00787 /* RSDatabase in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051924E53D6200A00787 /* RSDatabase */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1704051D24E53D6200A00787 /* RSDatabaseObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051C24E53D6200A00787 /* RSDatabaseObjC */; }; - 1704051E24E53D6200A00787 /* RSDatabaseObjC in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051C24E53D6200A00787 /* RSDatabaseObjC */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1704052024E53D6200A00787 /* RSParser in Frameworks */ = {isa = PBXBuildFile; productRef = 1704051F24E53D6200A00787 /* RSParser */; }; - 1704052124E53D6200A00787 /* RSParser in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704051F24E53D6200A00787 /* RSParser */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1704052324E53D6200A00787 /* RSParserObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 1704052224E53D6200A00787 /* RSParserObjC */; }; - 1704052424E53D6200A00787 /* RSParserObjC in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1704052224E53D6200A00787 /* RSParserObjC */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 1717535624BADF33004498C6 /* GeneralPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1717535524BADF33004498C6 /* GeneralPreferencesModel.swift */; }; 171BCB8C24CB08A3006E22D9 /* FixAccountCredentialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */; }; 171BCB8D24CB08A3006E22D9 /* FixAccountCredentialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */; }; @@ -1336,14 +1321,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 1704051E24E53D6200A00787 /* RSDatabaseObjC in Embed Frameworks */, - 1704051B24E53D6200A00787 /* RSDatabase in Embed Frameworks */, - 1704051824E53D6200A00787 /* RSWeb in Embed Frameworks */, - 1704051024E53D6200A00787 /* RSCore in Embed Frameworks */, - 1704052424E53D6200A00787 /* RSParserObjC in Embed Frameworks */, 51E4997724A87FFC00B667CB /* Sparkle.framework in Embed Frameworks */, - 1704052124E53D6200A00787 /* RSParser in Embed Frameworks */, - 1704051524E53D6200A00787 /* RSTree in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -2053,18 +2031,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1704052324E53D6200A00787 /* RSParserObjC in Frameworks */, - 1704051724E53D6200A00787 /* RSWeb in Frameworks */, - 1704052024E53D6200A00787 /* RSParser in Frameworks */, - 1704050F24E53D6200A00787 /* RSCore in Frameworks */, 516B695B24D2F28600B5702F /* Account in Frameworks */, 51E4997624A87FFC00B667CB /* Sparkle.framework in Frameworks */, - 1704051424E53D6200A00787 /* RSTree in Frameworks */, 51E498B124A806A400B667CB /* CloudKit.framework in Frameworks */, - 1704051224E53D6200A00787 /* RSCoreResources in Frameworks */, 51E498B324A806AA00B667CB /* WebKit.framework in Frameworks */, - 1704051D24E53D6200A00787 /* RSDatabaseObjC in Frameworks */, - 1704051A24E53D6200A00787 /* RSDatabase in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3666,14 +3636,6 @@ name = "Multiplatform macOS"; packageProductDependencies = ( 516B695A24D2F28600B5702F /* Account */, - 1704050E24E53D6200A00787 /* RSCore */, - 1704051124E53D6200A00787 /* RSCoreResources */, - 1704051324E53D6200A00787 /* RSTree */, - 1704051624E53D6200A00787 /* RSWeb */, - 1704051924E53D6200A00787 /* RSDatabase */, - 1704051C24E53D6200A00787 /* RSDatabaseObjC */, - 1704051F24E53D6200A00787 /* RSParser */, - 1704052224E53D6200A00787 /* RSParserObjC */, ); productName = macOS; productReference = 51C0514424A77DF800194D5E /* NetNewsWire.app */; @@ -5811,46 +5773,6 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 1704050E24E53D6200A00787 /* RSCore */ = { - isa = XCSwiftPackageProductDependency; - package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; - productName = RSCore; - }; - 1704051124E53D6200A00787 /* RSCoreResources */ = { - isa = XCSwiftPackageProductDependency; - package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; - productName = RSCoreResources; - }; - 1704051324E53D6200A00787 /* RSTree */ = { - isa = XCSwiftPackageProductDependency; - package = 510ECA4024D1DCD0001C31A6 /* XCRemoteSwiftPackageReference "RSTree" */; - productName = RSTree; - }; - 1704051624E53D6200A00787 /* RSWeb */ = { - isa = XCSwiftPackageProductDependency; - package = 51383A3024D1F90E0027E272 /* XCRemoteSwiftPackageReference "RSWeb" */; - productName = RSWeb; - }; - 1704051924E53D6200A00787 /* RSDatabase */ = { - isa = XCSwiftPackageProductDependency; - package = 51B0DF0D24D24E3B000AD99E /* XCRemoteSwiftPackageReference "RSDatabase" */; - productName = RSDatabase; - }; - 1704051C24E53D6200A00787 /* RSDatabaseObjC */ = { - isa = XCSwiftPackageProductDependency; - package = 51B0DF0D24D24E3B000AD99E /* XCRemoteSwiftPackageReference "RSDatabase" */; - productName = RSDatabaseObjC; - }; - 1704051F24E53D6200A00787 /* RSParser */ = { - isa = XCSwiftPackageProductDependency; - package = 51B0DF2324D2C7FA000AD99E /* XCRemoteSwiftPackageReference "RSParser" */; - productName = RSParser; - }; - 1704052224E53D6200A00787 /* RSParserObjC */ = { - isa = XCSwiftPackageProductDependency; - package = 51B0DF2324D2C7FA000AD99E /* XCRemoteSwiftPackageReference "RSParser" */; - productName = RSParserObjC; - }; 17A1597B24E3DEDD005DA32A /* RSCore */ = { isa = XCSwiftPackageProductDependency; package = 5102AE4324D17E820050839C /* XCRemoteSwiftPackageReference "RSCore" */; From 316edadb66e07d7e06f7127459287f87664c0278 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 22:21:31 +0800 Subject: [PATCH 12/15] Fixes display issues on Inspectors --- .../Inspector/InspectorPlatformModifier.swift | 8 +--- .../Shared/Inspector/InspectorView.swift | 44 +++++++++---------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/Multiplatform/Shared/Inspector/InspectorPlatformModifier.swift b/Multiplatform/Shared/Inspector/InspectorPlatformModifier.swift index c287fd91d..f78c6f4fb 100644 --- a/Multiplatform/Shared/Inspector/InspectorPlatformModifier.swift +++ b/Multiplatform/Shared/Inspector/InspectorPlatformModifier.swift @@ -16,17 +16,13 @@ struct InspectorPlatformModifier: ViewModifier { @ViewBuilder func body(content: Content) -> some View { #if os(macOS) - Form { - content - } + content .textFieldStyle(RoundedBorderTextFieldStyle()) .frame(width: 300) .padding() #else NavigationView { - List { - content - } + content .listStyle(InsetGroupedListStyle()) .navigationBarTitle("Inspector", displayMode: .inline) .navigationBarItems( diff --git a/Multiplatform/Shared/Inspector/InspectorView.swift b/Multiplatform/Shared/Inspector/InspectorView.swift index 2ce26c2a3..d4c6b6729 100644 --- a/Multiplatform/Shared/Inspector/InspectorView.swift +++ b/Multiplatform/Shared/Inspector/InspectorView.swift @@ -36,9 +36,9 @@ struct InspectorView: View { // MARK: WebFeed Inspector - @ViewBuilder + var WebFeedInspectorView: some View { - Group { + Form { Section(header: webFeedHeader) { TextField("", text: $inspectorModel.editedName) } @@ -85,13 +85,13 @@ struct InspectorView: View { Text("Copy Home Page URL") }) })) - } - .sheet(isPresented: $inspectorModel.showHomePage, onDismiss: { inspectorModel.showHomePage = false }) { - #if os(macOS) - EmptyView() - #else - SafariView(url: URL(string: (sidebarItem.feed as! WebFeed).homePageURL!)!) - #endif + .sheet(isPresented: $inspectorModel.showHomePage, onDismiss: { inspectorModel.showHomePage = false }) { + #if os(macOS) + EmptyView() + #else + SafariView(url: URL(string: (sidebarItem.feed as! WebFeed).homePageURL!)!) + #endif + } } } @@ -101,9 +101,9 @@ struct InspectorView: View { Section(header: Text("Feed URL")) { VStack { - #if os(macOS) - Spacer() // This shouldn't be necessary, but for some reason macOS doesn't put the space in itself - #endif +// #if os(macOS) +// Spacer() // This shouldn't be necessary, but for some reason macOS doesn't put the space in itself +// #endif Text(verbatim: (sidebarItem.feed as? WebFeed)?.url ?? "") .fixedSize(horizontal: false, vertical: true) .contextMenu(ContextMenu(menuItems: { @@ -131,8 +131,7 @@ struct InspectorView: View { Button("Done", action: { inspectorModel.shouldUpdate = true }) - - }.padding([.top, .bottom]) + }.padding([.top, .bottom], 20) #endif } .onAppear { @@ -156,15 +155,14 @@ struct InspectorView: View { .frame(width: 50, height: 50) } Spacer() - }.padding() + }.padding(.top, 20) } // MARK: Folder Inspector - @ViewBuilder var FolderInspectorView: some View { - Group { + Form { Section(header: folderHeader) { TextField("", text: $inspectorModel.editedName) } @@ -174,13 +172,12 @@ struct InspectorView: View { Spacer() Button("Cancel", action: { presentationMode.wrappedValue.dismiss() - }).keyboardShortcut(.cancelAction) + }) Button("Done", action: { inspectorModel.shouldUpdate = true - }).keyboardShortcut(.defaultAction) - }.padding(.top) + }) + }.padding([.top, .bottom]) #endif - } .onAppear { inspectorModel.configure(with: sidebarItem.represented as! Folder) @@ -204,15 +201,14 @@ struct InspectorView: View { .frame(width: 50, height: 50) } Spacer() - }.padding() + }.padding(.top, 20) } // MARK: Account Inspector - @ViewBuilder var AccountInspectorView: some View { - Group { + Form { Section(header: accountHeader) { TextField("", text: $inspectorModel.editedName) Toggle("Active", isOn: $inspectorModel.accountIsActive) From 5682f659b26406a5438fbfe34d91b5bdda7e6ed9 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 22:22:33 +0800 Subject: [PATCH 13/15] Removes another @ViewBuilder --- Multiplatform/Shared/Inspector/InspectorView.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Multiplatform/Shared/Inspector/InspectorView.swift b/Multiplatform/Shared/Inspector/InspectorView.swift index d4c6b6729..3111cd3ab 100644 --- a/Multiplatform/Shared/Inspector/InspectorView.swift +++ b/Multiplatform/Shared/Inspector/InspectorView.swift @@ -17,7 +17,6 @@ struct InspectorView: View { @StateObject private var inspectorModel = InspectorModel() var sidebarItem: SidebarItem - @ViewBuilder var body: some View { switch sidebarItem.representedType { case .webFeed: From 7aab8c87fb17190bec5410f2e56d02560c721dd7 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 13 Aug 2020 22:25:34 +0800 Subject: [PATCH 14/15] Removes more @ViewBuilders --- Multiplatform/Shared/Add/AddFolderView.swift | 4 ++-- Multiplatform/Shared/Add/AddWebFeedView.swift | 2 +- Multiplatform/Shared/Timeline/TimelineItemStatusView.swift | 2 +- .../Preference Panes/Viewing/LayoutPreferencesView.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Multiplatform/Shared/Add/AddFolderView.swift b/Multiplatform/Shared/Add/AddFolderView.swift index b6c145b3a..3256b6fea 100644 --- a/Multiplatform/Shared/Add/AddFolderView.swift +++ b/Multiplatform/Shared/Add/AddFolderView.swift @@ -36,7 +36,7 @@ struct AddFolderView: View { #endif } #if os(iOS) - @ViewBuilder var iosForm: some View { + var iosForm: some View { NavigationView { Form { Section { @@ -67,7 +67,7 @@ struct AddFolderView: View { #endif #if os(macOS) - @ViewBuilder var macForm: some View { + var macForm: some View { Form { HStack { Spacer() diff --git a/Multiplatform/Shared/Add/AddWebFeedView.swift b/Multiplatform/Shared/Add/AddWebFeedView.swift index 1dc35b3f4..d040c7391 100644 --- a/Multiplatform/Shared/Add/AddWebFeedView.swift +++ b/Multiplatform/Shared/Add/AddWebFeedView.swift @@ -80,7 +80,7 @@ struct AddWebFeedView: View { #endif #if os(iOS) - @ViewBuilder var iosForm: some View { + var iosForm: some View { NavigationView { List { urlTextField diff --git a/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift b/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift index aae80f9b7..540c35f04 100644 --- a/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift +++ b/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift @@ -13,7 +13,7 @@ struct TimelineItemStatusView: View { var selected: Bool var status: TimelineItemStatus - @ViewBuilder var statusView: some View { + var statusView: some View { ZStack { Spacer().frame(width: 12) switch status { diff --git a/Multiplatform/macOS/Preferences/Preference Panes/Viewing/LayoutPreferencesView.swift b/Multiplatform/macOS/Preferences/Preference Panes/Viewing/LayoutPreferencesView.swift index b5c1f72e6..abc9e5a2c 100644 --- a/Multiplatform/macOS/Preferences/Preference Panes/Viewing/LayoutPreferencesView.swift +++ b/Multiplatform/macOS/Preferences/Preference Panes/Viewing/LayoutPreferencesView.swift @@ -59,7 +59,7 @@ struct LayoutPreferencesView: View { } - @ViewBuilder + var timelineRowPreview: some View { HStack(alignment: .top) { Image(systemName: "circle.fill") From 0a51508abfd500227917c68e50d176e625cb1c1a Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Fri, 14 Aug 2020 00:04:39 +0800 Subject: [PATCH 15/15] Reduces reliance on presentationMode to dismiss Bindings are passed instead and this fixes issues with Add Web (etc) only appearing once. --- Multiplatform/Shared/Add/AddFolderView.swift | 18 +++----- Multiplatform/Shared/Add/AddWebFeedView.swift | 19 ++++---- .../Shared/SceneNavigationModel.swift | 21 +++++++++ .../Shared/SceneNavigationView.swift | 45 +++++++++---------- .../Sidebar/SidebarToolbarModifier.swift | 4 +- NetNewsWire.xcodeproj/project.pbxproj | 6 +++ 6 files changed, 62 insertions(+), 51 deletions(-) create mode 100644 Multiplatform/Shared/SceneNavigationModel.swift diff --git a/Multiplatform/Shared/Add/AddFolderView.swift b/Multiplatform/Shared/Add/AddFolderView.swift index 3256b6fea..1167096c5 100644 --- a/Multiplatform/Shared/Add/AddFolderView.swift +++ b/Multiplatform/Shared/Add/AddFolderView.swift @@ -12,8 +12,8 @@ import RSCore struct AddFolderView: View { - @Environment(\.presentationMode) private var presentationMode @ObservedObject private var viewModel = AddFolderModel() + @Binding var isPresented: Bool var body: some View { #if os(iOS) @@ -21,16 +21,14 @@ struct AddFolderView: View { .onReceive(viewModel.$shouldDismiss, perform: { dismiss in if dismiss == true { - presentationMode - .wrappedValue - .dismiss() + isPresented = false } }) #else macForm .onReceive(viewModel.$shouldDismiss, perform: { dismiss in if dismiss == true { - presentationMode.wrappedValue.dismiss() + isPresented = false } }) #endif @@ -50,7 +48,7 @@ struct AddFolderView: View { .navigationBarTitleDisplayMode(.inline) .navigationBarItems( leading:Button("Cancel", action: { - presentationMode.wrappedValue.dismiss() + isPresented = false } ) .help("Cancel Adding Folder"), @@ -113,7 +111,7 @@ struct AddFolderView: View { } Spacer() Button("Cancel", action: { - presentationMode.wrappedValue.dismiss() + isPresented = false }) .help("Cancel Adding Folder") @@ -125,9 +123,3 @@ struct AddFolderView: View { } } } - -struct AddFolderView_Previews: PreviewProvider { - static var previews: some View { - AddFolderView() - } -} diff --git a/Multiplatform/Shared/Add/AddWebFeedView.swift b/Multiplatform/Shared/Add/AddWebFeedView.swift index d040c7391..e898312e0 100644 --- a/Multiplatform/Shared/Add/AddWebFeedView.swift +++ b/Multiplatform/Shared/Add/AddWebFeedView.swift @@ -13,8 +13,8 @@ import RSCore struct AddWebFeedView: View { - @Environment(\.presentationMode) private var presentationMode @StateObject private var viewModel = AddWebFeedModel() + @Binding var isPresented: Bool var body: some View { #if os(iOS) @@ -24,7 +24,7 @@ struct AddWebFeedView: View { } .onReceive(viewModel.$shouldDismiss, perform: { dismiss in if dismiss == true { - presentationMode.wrappedValue.dismiss() + isPresented = false } }) #else @@ -37,9 +37,10 @@ struct AddWebFeedView: View { dismissButton: Alert.Button.cancel({ viewModel.addFeedError = AddWebFeedError.none })) - }.onReceive(viewModel.$shouldDismiss, perform: { dismiss in + } + .onChange(of: viewModel.shouldDismiss, perform: { dismiss in if dismiss == true { - presentationMode.wrappedValue.dismiss() + isPresented = false } }) #endif @@ -92,7 +93,7 @@ struct AddWebFeedView: View { .navigationBarTitleDisplayMode(.inline) .navigationBarItems(leading: Button("Cancel", action: { - presentationMode.wrappedValue.dismiss() + isPresented = false }) .help("Cancel Add Feed") , trailing: @@ -188,7 +189,7 @@ struct AddWebFeedView: View { } Spacer() Button("Cancel", action: { - presentationMode.wrappedValue.dismiss() + isPresented = false }) .help("Cancel Add Feed") @@ -205,8 +206,4 @@ struct AddWebFeedView: View { } -struct AddFeedView_Previews: PreviewProvider { - static var previews: some View { - AddWebFeedView() - } -} + diff --git a/Multiplatform/Shared/SceneNavigationModel.swift b/Multiplatform/Shared/SceneNavigationModel.swift new file mode 100644 index 000000000..f613210f7 --- /dev/null +++ b/Multiplatform/Shared/SceneNavigationModel.swift @@ -0,0 +1,21 @@ +// +// SceneNavigationModel.swift +// NetNewsWire +// +// Created by Stuart Breckenridge on 13/8/20. +// Copyright © 2020 Ranchero Software. All rights reserved. +// + +import Foundation + + +class SceneNavigationModel: ObservableObject { + @Published var sheetToShow: SidebarSheets = .none { + didSet { + sheetToShow != .none ? (showSheet = true) : (showSheet = false) + } + } + @Published var showSheet = false + @Published var showShareSheet = false + @Published var showAccountSyncErrorAlert = false +} diff --git a/Multiplatform/Shared/SceneNavigationView.swift b/Multiplatform/Shared/SceneNavigationView.swift index dac1dfa88..190164638 100644 --- a/Multiplatform/Shared/SceneNavigationView.swift +++ b/Multiplatform/Shared/SceneNavigationView.swift @@ -12,13 +12,11 @@ import Account import AppKit #endif + struct SceneNavigationView: View { @StateObject private var sceneModel = SceneModel() - @State private var showSheet = false - @State private var showShareSheet = false - @State private var sheetToShow: SidebarSheets = .none - @State private var showAccountSyncErrorAlert = false // multiple sync errors + @StateObject private var sceneNavigationModel = SceneNavigationModel() #if os(iOS) @Environment(\.horizontalSizeClass) private var horizontalSizeClass @@ -47,41 +45,38 @@ struct SceneNavigationView: View { .onAppear { sceneModel.startup() } - .onChange(of: sheetToShow) { value in - value != .none ? (showSheet = true) : (showSheet = false) - } .onReceive(sceneModel.$accountSyncErrors) { errors in if errors.count == 0 { - showAccountSyncErrorAlert = false + sceneNavigationModel.showAccountSyncErrorAlert = false } else { if errors.count > 1 { - showAccountSyncErrorAlert = true + sceneNavigationModel.showAccountSyncErrorAlert = true } else { - sheetToShow = .fixCredentials + sceneNavigationModel.sheetToShow = .fixCredentials } } } - .sheet(isPresented: $showSheet, + .sheet(isPresented: $sceneNavigationModel.showSheet, onDismiss: { - sheetToShow = .none + sceneNavigationModel.sheetToShow = .none sceneModel.accountSyncErrors = [] }) { - if sheetToShow == .web { - AddWebFeedView() + if sceneNavigationModel.sheetToShow == .web { + AddWebFeedView(isPresented: $sceneNavigationModel.showSheet) } - if sheetToShow == .folder { - AddFolderView() + if sceneNavigationModel.sheetToShow == .folder { + AddFolderView(isPresented: $sceneNavigationModel.showSheet) } #if os(iOS) - if sheetToShow == .settings { + if sceneNavigationModel.sheetToShow == .settings { SettingsView() } #endif - if sheetToShow == .fixCredentials { + if sceneNavigationModel.sheetToShow == .fixCredentials { FixAccountCredentialView(accountSyncError: sceneModel.accountSyncErrors[0]) } } - .alert(isPresented: $showAccountSyncErrorAlert, content: { + .alert(isPresented: $sceneNavigationModel.showAccountSyncErrorAlert, content: { #if os(macOS) return Alert(title: Text("Account Sync Error"), message: Text("The following accounts failed to sync: ") + Text(sceneModel.accountSyncErrors.map({ $0.account.nameForDisplay }).joined(separator: ", ")) + Text(". You can update credentials in Preferences"), @@ -91,7 +86,7 @@ struct SceneNavigationView: View { message: Text("The following accounts failed to sync: ") + Text(sceneModel.accountSyncErrors.map({ $0.account.nameForDisplay }).joined(separator: ", ")) + Text(". You can update credentials in Settings"), primaryButton: .default(Text("Show Settings"), action: { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { - sheetToShow = .settings + sceneNavigationModel.sheetToShow = .settings }) }), @@ -112,10 +107,10 @@ struct SceneNavigationView: View { } ToolbarItem() { Menu { - Button("Add Web Feed", action: { sheetToShow = .web }) + Button("Add Web Feed", action: { sceneNavigationModel.sheetToShow = .web }) Button("Add Reddit Feed", action: { }) Button("Add Twitter Feed", action: { }) - Button("Add Folder", action: { sheetToShow = .folder}) + Button("Add Folder", action: { sceneNavigationModel.sheetToShow = .folder}) } label : { AppAssets.addMenuImage } @@ -197,12 +192,12 @@ struct SceneNavigationView: View { } ToolbarItem { ZStack { - if showShareSheet { - SharingServiceView(articles: sceneModel.selectedArticles, showing: $showShareSheet) + if sceneNavigationModel.showShareSheet { + SharingServiceView(articles: sceneModel.selectedArticles, showing: $sceneNavigationModel.showShareSheet) .frame(width: 20, height: 20) } Button { - showShareSheet = true + sceneNavigationModel.showShareSheet = true } label: { AppAssets.shareImage } diff --git a/Multiplatform/Shared/Sidebar/SidebarToolbarModifier.swift b/Multiplatform/Shared/Sidebar/SidebarToolbarModifier.swift index 9d604c2a5..b0096513e 100644 --- a/Multiplatform/Shared/Sidebar/SidebarToolbarModifier.swift +++ b/Multiplatform/Shared/Sidebar/SidebarToolbarModifier.swift @@ -81,10 +81,10 @@ struct SidebarToolbarModifier: ViewModifier { } .sheet(isPresented: $viewModel.showSheet, onDismiss: { viewModel.sheetToShow = .none }) { if viewModel.sheetToShow == .web { - AddWebFeedView() + AddWebFeedView(isPresented: $viewModel.showSheet) } if viewModel.sheetToShow == .folder { - AddFolderView() + AddFolderView(isPresented: $viewModel.showSheet) } if viewModel.sheetToShow == .settings { SettingsView() diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index fda989d4a..487c38536 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 1704053424E5985A00A00787 /* SceneNavigationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1704053324E5985A00A00787 /* SceneNavigationModel.swift */; }; + 1704053524E5985A00A00787 /* SceneNavigationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1704053324E5985A00A00787 /* SceneNavigationModel.swift */; }; 1717535624BADF33004498C6 /* GeneralPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1717535524BADF33004498C6 /* GeneralPreferencesModel.swift */; }; 171BCB8C24CB08A3006E22D9 /* FixAccountCredentialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */; }; 171BCB8D24CB08A3006E22D9 /* FixAccountCredentialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */; }; @@ -1415,6 +1417,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1704053324E5985A00A00787 /* SceneNavigationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneNavigationModel.swift; sourceTree = ""; }; 1717535524BADF33004498C6 /* GeneralPreferencesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralPreferencesModel.swift; sourceTree = ""; }; 171BCB8B24CB08A3006E22D9 /* FixAccountCredentialView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FixAccountCredentialView.swift; sourceTree = ""; }; 172199C824AB228900A31D04 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; @@ -2634,6 +2637,7 @@ FF64D0C424AF53EE0084080A /* RefreshProgressModel.swift */, 51E499D724A912C200B667CB /* SceneModel.swift */, 51E49A0224A91FF600B667CB /* SceneNavigationView.swift */, + 1704053324E5985A00A00787 /* SceneNavigationModel.swift */, 51C0513824A77DF800194D5E /* Assets.xcassets */, 17930ED224AF10CD00A9BA52 /* Add */, 51A576B924AE617B00078888 /* Article */, @@ -4419,6 +4423,7 @@ 51E498F124A8085D00B667CB /* StarredFeedDelegate.swift in Sources */, 51E498FF24A808BB00B667CB /* SingleFaviconDownloader.swift in Sources */, 51E4997224A8784300B667CB /* DefaultFeedsImporter.swift in Sources */, + 1704053424E5985A00A00787 /* SceneNavigationModel.swift in Sources */, 514E6C0924AD39AD00AC6F6E /* ArticleIconImageLoader.swift in Sources */, 6594CA3B24AF6F2A005C7D7C /* OPMLExporter.swift in Sources */, FA80C13E24B072AA00974098 /* AddFolderModel.swift in Sources */, @@ -4643,6 +4648,7 @@ 514E6C0324AD29A300AC6F6E /* TimelineItemStatusView.swift in Sources */, 51B54A6524B549B20014348B /* WrapperScriptMessageHandler.swift in Sources */, 51E4996D24A8762D00B667CB /* ArticleExtractor.swift in Sources */, + 1704053524E5985A00A00787 /* SceneNavigationModel.swift in Sources */, 51E4994024A8713B00B667CB /* AccountRefreshTimer.swift in Sources */, 51E49A0424A91FF600B667CB /* SceneNavigationView.swift in Sources */, 51E498CC24A8085D00B667CB /* SearchFeedDelegate.swift in Sources */,