Inject the Accounts folder name so that it can be in different locations between the iOS and Mac Apps.

This commit is contained in:
Maurice Parker
2019-09-12 10:59:26 -05:00
parent ca191c9a4e
commit 5985b00480
3 changed files with 10 additions and 6 deletions

View File

@@ -52,6 +52,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
super.init()
appDelegate = self
AccountManager.shared = AccountManager(accountsFolder: RSDataSubfolder(nil, "Accounts")!)
registerBackgroundTasks()
@@ -59,9 +61,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
NotificationCenter.default.addObserver(self, selector: #selector(accountRefreshDidFinish(_:)), name: .AccountRefreshDidFinish, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil)
// Reinitialize the shared state as early as possible
_ = AccountManager.shared
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {