Update picker for Share Extension to be hierarchical and use icons. Issue #1269

This commit is contained in:
Maurice Parker
2019-11-16 19:44:01 -06:00
parent e74e6cb875
commit 397d8e8ffa
17 changed files with 236 additions and 131 deletions

View File

@@ -119,10 +119,10 @@ struct AppDefaults {
}
}
static var timelineIconSize: MasterTimelineIconSize {
static var timelineIconSize: IconSize {
get {
let rawValue = AppDefaults.shared.integer(forKey: Key.timelineIconSize)
return MasterTimelineIconSize(rawValue: rawValue) ?? MasterTimelineIconSize.medium
return IconSize(rawValue: rawValue) ?? IconSize.medium
}
set {
AppDefaults.shared.set(newValue.rawValue, forKey: Key.timelineIconSize)
@@ -133,7 +133,7 @@ struct AppDefaults {
let defaults: [String : Any] = [Key.lastImageCacheFlushDate: Date(),
Key.timelineGroupByFeed: false,
Key.timelineNumberOfLines: 2,
Key.timelineIconSize: MasterTimelineIconSize.medium.rawValue,
Key.timelineIconSize: IconSize.medium.rawValue,
Key.timelineSortDirection: ComparisonResult.orderedDescending.rawValue,
Key.displayUndoAvailableTip: true]
AppDefaults.shared.register(defaults: defaults)
@@ -202,5 +202,3 @@ private extension AppDefaults {
}
}