diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index fe1756c21..0ec5792ad 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -33,7 +33,6 @@ public final class Account: Hashable { var topLevelObjects = [AnyObject]() var feedIDDictionary = [String: Feed]() var username: String? - var accountInfo = AccountInfo() init(settingsFile: String, type: AccountType, dataFolder: String, identifier: String, delegate: AccountDelegate) { @@ -49,6 +48,13 @@ public final class Account: Hashable { return lhs === rhs } + + // MARK: - API + + func refreshAll() { + + delegate.refreshAll() + } } diff --git a/Frameworks/Account/Account.xcodeproj/project.pbxproj b/Frameworks/Account/Account.xcodeproj/project.pbxproj index 54531ce56..87d3c1e92 100644 --- a/Frameworks/Account/Account.xcodeproj/project.pbxproj +++ b/Frameworks/Account/Account.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 841974011F6DD1EC006346C4 /* Folder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841974001F6DD1EC006346C4 /* Folder.swift */; }; 841974181F6DD535006346C4 /* Folder+Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841974171F6DD535006346C4 /* Folder+Container.swift */; }; 8419741A1F6DD583006346C4 /* Account+Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841974191F6DD583006346C4 /* Account+Container.swift */; }; + 841974251F6DDCE4006346C4 /* AccountDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841974241F6DDCE4006346C4 /* AccountDelegate.swift */; }; 8469F8171F6DD0AD0084783E /* Database.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8401A17D1F6DC388002B1BE2 /* Database.framework */; }; 8469F81C1F6DD15E0084783E /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848935101F62486800CEBD24 /* Account.swift */; }; 848935001F62484F00CEBD24 /* Account.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 848934F61F62484F00CEBD24 /* Account.framework */; }; @@ -101,6 +102,7 @@ 8419740D1F6DD25F006346C4 /* Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Container.swift; sourceTree = ""; }; 841974171F6DD535006346C4 /* Folder+Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+Container.swift"; sourceTree = ""; }; 841974191F6DD583006346C4 /* Account+Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Account+Container.swift"; sourceTree = ""; }; + 841974241F6DDCE4006346C4 /* AccountDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountDelegate.swift; sourceTree = ""; }; 848934F61F62484F00CEBD24 /* Account.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Account.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 848934FA1F62484F00CEBD24 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 848934FF1F62484F00CEBD24 /* AccountTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AccountTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -194,6 +196,7 @@ isa = PBXGroup; children = ( 848935101F62486800CEBD24 /* Account.swift */, + 841974241F6DDCE4006346C4 /* AccountDelegate.swift */, 841974001F6DD1EC006346C4 /* Folder.swift */, 841974141F6DD4FF006346C4 /* Container */, 8469F80F1F6DC3C10084783E /* Frameworks */, @@ -417,6 +420,7 @@ files = ( 8469F81C1F6DD15E0084783E /* Account.swift in Sources */, 8419741A1F6DD583006346C4 /* Account+Container.swift in Sources */, + 841974251F6DDCE4006346C4 /* AccountDelegate.swift in Sources */, 841974011F6DD1EC006346C4 /* Folder.swift in Sources */, 841974181F6DD535006346C4 /* Folder+Container.swift in Sources */, ); diff --git a/Frameworks/Account/AccountDelegate.swift b/Frameworks/Account/AccountDelegate.swift new file mode 100644 index 000000000..37593a782 --- /dev/null +++ b/Frameworks/Account/AccountDelegate.swift @@ -0,0 +1,15 @@ +// +// AccountDelegate.swift +// Account +// +// Created by Brent Simmons on 9/16/17. +// Copyright © 2017 Ranchero Software, LLC. All rights reserved. +// + +import Foundation + +public protocol AccountDelegate { + + func refreshAll() + +}