From 6f8c58e7a25841270a660d7a93010f2f7329e239 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 17 Sep 2019 10:58:41 -0500 Subject: [PATCH] Rename attributed string bridging class to better emphasize that it is for Settings only views --- NetNewsWire.xcodeproj/project.pbxproj | 8 ++++---- iOS/Settings/SettingsAboutView.swift | 10 +++++----- .../SettingsAttributedStringView.swift} | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) rename iOS/{SwiftUI Extensions/AttributedStringView.swift => Settings/SettingsAttributedStringView.swift} (87%) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index e72060edf..868c4efbe 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -29,7 +29,7 @@ 5132285B232FF2C40033D4ED /* SettingsRefreshSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5132285A232FF2C40033D4ED /* SettingsRefreshSelectionView.swift */; }; 513228FB233037630033D4ED /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513228F2233037620033D4ED /* Reachability.swift */; }; 513228FC233037630033D4ED /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513228F2233037620033D4ED /* Reachability.swift */; }; - 513229312330523F0033D4ED /* AttributedStringView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513229302330523F0033D4ED /* AttributedStringView.swift */; }; + 513229312330523F0033D4ED /* SettingsAttributedStringView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513229302330523F0033D4ED /* SettingsAttributedStringView.swift */; }; 5132293B23305D4C0033D4ED /* SettingsAboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5132293A23305D4C0033D4ED /* SettingsAboutView.swift */; }; 513C5CE9232571C2003D4054 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513C5CE8232571C2003D4054 /* ShareViewController.swift */; }; 513C5CEC232571C2003D4054 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 513C5CEA232571C2003D4054 /* MainInterface.storyboard */; }; @@ -773,7 +773,7 @@ 51322858232FDDB80033D4ED /* VibrantButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VibrantButtonStyle.swift; sourceTree = ""; }; 5132285A232FF2C40033D4ED /* SettingsRefreshSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsRefreshSelectionView.swift; sourceTree = ""; }; 513228F2233037620033D4ED /* Reachability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Reachability.swift; sourceTree = ""; }; - 513229302330523F0033D4ED /* AttributedStringView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedStringView.swift; sourceTree = ""; }; + 513229302330523F0033D4ED /* SettingsAttributedStringView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAttributedStringView.swift; sourceTree = ""; }; 5132293A23305D4C0033D4ED /* SettingsAboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAboutView.swift; sourceTree = ""; }; 513C5CE6232571C2003D4054 /* NetNewsWire iOS Share Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "NetNewsWire iOS Share Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 513C5CE8232571C2003D4054 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = ""; }; @@ -1231,6 +1231,7 @@ children = ( 51F35D0822AFD4760003CE1B /* SettingsView.swift */, 5132293A23305D4C0033D4ED /* SettingsAboutView.swift */, + 513229302330523F0033D4ED /* SettingsAttributedStringView.swift */, 5132285A232FF2C40033D4ED /* SettingsRefreshSelectionView.swift */, 5194B5F122B69FCC00144881 /* SettingsSubscriptionsExportDocumentPickerView.swift */, 5194B5ED22B6965300144881 /* SettingsSubscriptionsImportDocumentPickerView.swift */, @@ -1252,7 +1253,6 @@ 5194B5E222B693EC00144881 /* SwiftUI Extensions */ = { isa = PBXGroup; children = ( - 513229302330523F0033D4ED /* AttributedStringView.swift */, DF999FF622B5AEFA0064B687 /* SafariView.swift */, 51322858232FDDB80033D4ED /* VibrantButtonStyle.swift */, 51322854232EED360033D4ED /* VibrantSelectAction.swift */, @@ -2712,7 +2712,7 @@ 519D73FB2323FF35008BB345 /* SettingsView.swift in Sources */, 511D4419231FC02D00FB1562 /* KeyboardManager.swift in Sources */, 51C45293226509C800C03939 /* StarredFeedDelegate.swift in Sources */, - 513229312330523F0033D4ED /* AttributedStringView.swift in Sources */, + 513229312330523F0033D4ED /* SettingsAttributedStringView.swift in Sources */, 51D6A5BC23199C85001C27D8 /* MasterTimelineDataSource.swift in Sources */, 51934CCB230F599B006127BE /* ThemedNavigationController.swift in Sources */, ); diff --git a/iOS/Settings/SettingsAboutView.swift b/iOS/Settings/SettingsAboutView.swift index bcc275dc0..1549f2d7d 100644 --- a/iOS/Settings/SettingsAboutView.swift +++ b/iOS/Settings/SettingsAboutView.swift @@ -16,18 +16,18 @@ struct SettingsAboutView: View { var body: some View { Form { Text("NetNewsWire").font(.largeTitle) - AttributedStringView(string: viewModel.about).frame(height: 54) + SettingsAttributedStringView(string: viewModel.about).frame(height: 54) Section(header: Text("CREDITS")) { - AttributedStringView(string: viewModel.credits).frame(height: 135) + SettingsAttributedStringView(string: viewModel.credits).frame(height: 135) } Section(header: Text("ACKNOWLEDGEMENTS")) { - AttributedStringView(string: viewModel.acknowledgements).frame(height: 81) + SettingsAttributedStringView(string: viewModel.acknowledgements).frame(height: 81) } Section(header: Text("THANKS")) { - AttributedStringView(string: viewModel.thanks).frame(height: 189) + SettingsAttributedStringView(string: viewModel.thanks).frame(height: 189) } Section(header: Text("DEDICATION"), footer: Text("Copyright © 2002-2019 Ranchero Software").font(.footnote)) { - AttributedStringView(string: viewModel.dedication).frame(height: 108) + SettingsAttributedStringView(string: viewModel.dedication).frame(height: 108) } } } diff --git a/iOS/SwiftUI Extensions/AttributedStringView.swift b/iOS/Settings/SettingsAttributedStringView.swift similarity index 87% rename from iOS/SwiftUI Extensions/AttributedStringView.swift rename to iOS/Settings/SettingsAttributedStringView.swift index 273fd0866..c1adf4a0c 100644 --- a/iOS/SwiftUI Extensions/AttributedStringView.swift +++ b/iOS/Settings/SettingsAttributedStringView.swift @@ -1,5 +1,5 @@ // -// AttributedStringView.swift +// SettingsAttributedStringView.swift // NetNewsWire-iOS // // Created by Maurice Parker on 9/16/19. @@ -8,7 +8,7 @@ import SwiftUI -struct AttributedStringView: UIViewRepresentable { +struct SettingsAttributedStringView: UIViewRepresentable { let string: NSAttributedString