diff --git a/Shared/Models/WriteFreelyModel.swift b/Shared/Models/WriteFreelyModel.swift index 801d842..63b9695 100644 --- a/Shared/Models/WriteFreelyModel.swift +++ b/Shared/Models/WriteFreelyModel.swift @@ -6,25 +6,15 @@ import Network // MARK: - WriteFreelyModel final class WriteFreelyModel: ObservableObject { + + // MARK: - Models @Published var account = AccountModel() @Published var preferences = PreferencesModel() @Published var posts = PostListModel() @Published var editor = PostEditorModel() - @Published var isLoggingIn: Bool = false - @Published var isProcessingRequest: Bool = false - @Published var hasNetworkConnection: Bool = true - @Published var selectedPost: WFAPost? - @Published var selectedCollection: WFACollection? - @Published var showAllPosts: Bool = true - @Published var isPresentingDeleteAlert: Bool = false - @Published var postToDelete: WFAPost? + + // MARK: - Error handling @Published var hasError: Bool = false - #if os(iOS) - @Published var isPresentingSettingsView: Bool = false - #endif - - static var shared = WriteFreelyModel() - var currentError: Error? { didSet { #if DEBUG @@ -43,6 +33,21 @@ final class WriteFreelyModel: ObservableObject { } } + // MARK: - State + @Published var isLoggingIn: Bool = false + @Published var isProcessingRequest: Bool = false + @Published var hasNetworkConnection: Bool = true + @Published var selectedPost: WFAPost? + @Published var selectedCollection: WFACollection? + @Published var showAllPosts: Bool = true + @Published var isPresentingDeleteAlert: Bool = false + @Published var postToDelete: WFAPost? +#if os(iOS) + @Published var isPresentingSettingsView: Bool = false +#endif + + static var shared = WriteFreelyModel() + // swiftlint:disable line_length let helpURL = URL(string: "https://discuss.write.as/c/help/5")! let howToURL = URL(string: "https://discuss.write.as/t/using-the-writefreely-ios-app/1946")! diff --git a/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist b/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 155f2da..0000000 --- a/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - SchemeUserState - - ActionExtension-iOS.xcscheme_^#shared#^_ - - orderHint - 0 - - WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_ - - orderHint - 1 - - WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_ - - orderHint - 2 - - - -