Change Add Web Feed folder selection to be a separate controlling instead of the picker wheel. Issue #1270

This commit is contained in:
Maurice Parker
2019-11-16 12:02:58 -06:00
parent a8927e250f
commit 91a3e4fd73
11 changed files with 367 additions and 123 deletions

View File

@@ -25,6 +25,8 @@ struct AppDefaults {
static let timelineSortDirection = "timelineSortDirection"
static let displayUndoAvailableTip = "displayUndoAvailableTip"
static let lastRefresh = "lastRefresh"
static let addWebFeedAccountID = "addWebFeedAccountID"
static let addFolderAccountID = "addFolderAccountID"
}
static let isFirstRun: Bool = {
@@ -34,6 +36,24 @@ struct AppDefaults {
firstRunDate = Date()
return true
}()
static var addWebFeedAccountID: String? {
get {
return string(for: Key.addWebFeedAccountID)
}
set {
setString(for: Key.addWebFeedAccountID, newValue)
}
}
static var addFolderAccountID: String? {
get {
return string(for: Key.addFolderAccountID)
}
set {
setString(for: Key.addFolderAccountID, newValue)
}
}
static var lastImageCacheFlushDate: Date? {
get {
@@ -122,6 +142,14 @@ private extension AppDefaults {
}
}
static func string(for key: String) -> String? {
return UserDefaults.standard.string(forKey: key)
}
static func setString(for key: String, _ value: String?) {
UserDefaults.standard.set(value, forKey: key)
}
static func bool(for key: String) -> Bool {
return AppDefaults.shared.bool(forKey: key)
}