mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 18:32:55 +00:00
Create importFeedsIfNeeded shared AppDelegate method.
This commit is contained in:
1 parent
44a9a52705
commit
89a967106d
3 files changed
+31
-22
No files matched your search
+6
-10
@@ -64,20 +64,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
AppDefaults.registerDefaults()
|
||||
if AppDefaults.shared.isFirstRun {
|
||||
os_log(.debug, "Is first run.")
|
||||
}
|
||||
|
||||
let isFirstRun = AppDefaults.shared.isFirstRun
|
||||
if isFirstRun {
|
||||
os_log("Is first run.", log: log, type: .info)
|
||||
}
|
||||
|
||||
if isFirstRun && !AccountManager.shared.anyAccountHasAtLeastOneFeed() {
|
||||
let localAccount = AccountManager.shared.defaultAccount
|
||||
DefaultFeedsImporter.importDefaultFeeds(account: localAccount)
|
||||
}
|
||||
|
||||
FaviconGenerator.faviconTemplateImage = AppAssets.faviconTemplateImage
|
||||
|
||||
importFeedsIfNeeded()
|
||||
|
||||
registerBackgroundTasks()
|
||||
CacheCleaner.purgeIfNecessary()
|
||||
initializeDownloaders()
|
||||
|
||||
Reference in new issue
Block a user