2017-05-27 10:43:27 -07:00
|
|
|
//
|
|
|
|
// DefaultFeedsImporter.swift
|
2018-08-28 22:18:24 -07:00
|
|
|
// NetNewsWire
|
2017-05-27 10:43:27 -07:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 8/13/15.
|
|
|
|
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2017-09-17 12:34:10 -07:00
|
|
|
import Account
|
2017-05-27 10:43:27 -07:00
|
|
|
|
2024-03-19 23:05:30 -07:00
|
|
|
@MainActor struct DefaultFeedsImporter {
|
2017-05-27 10:43:27 -07:00
|
|
|
|
2019-10-17 13:25:11 -07:00
|
|
|
static func importDefaultFeeds(account: Account) {
|
2024-03-26 21:10:05 -07:00
|
|
|
|
2019-03-14 22:23:16 -07:00
|
|
|
let defaultFeedsURL = Bundle.main.url(forResource: "DefaultFeeds", withExtension: "opml")!
|
2024-03-26 21:10:05 -07:00
|
|
|
|
2024-06-08 11:58:30 -07:00
|
|
|
Task {
|
2024-03-26 21:10:05 -07:00
|
|
|
try? await AccountManager.shared.defaultAccount.importOPML(defaultFeedsURL)
|
|
|
|
}
|
2017-05-27 10:43:27 -07:00
|
|
|
}
|
|
|
|
}
|