// // AppearanceKeys.swift // TuskerPreferences // // Created by Shadowfacts on 4/13/24. // import Foundation import UIKit struct ThemeKey: MigratablePreferenceKey { static var defaultValue: Theme { .unspecified } } struct AccentColorKey: MigratablePreferenceKey { static var defaultValue: AccentColor { .default } } struct AvatarStyleKey: MigratablePreferenceKey { static var defaultValue: AvatarStyle { .roundRect } } struct LeadingSwipeActionsKey: MigratablePreferenceKey { static var defaultValue: [StatusSwipeAction] { [.favorite, .reblog] } } struct TrailingSwipeActionsKey: MigratablePreferenceKey { static var defaultValue: [StatusSwipeAction] { [.reply, .share] } } struct WidescreenNavigationModeKey: MigratablePreferenceKey { static var defaultValue: WidescreenNavigationMode { .multiColumn } static func shouldMigrate(oldValue: WidescreenNavigationMode) -> Bool { oldValue != .splitScreen } } struct AttachmentBlurModeKey: MigratablePreferenceKey { static var defaultValue: AttachmentBlurMode { .useStatusSetting } static func didSet(in store: PreferenceStore, newValue: AttachmentBlurMode) { if newValue == .always { store.blurMediaBehindContentWarning = true } else if newValue == .never { store.blurMediaBehindContentWarning = false } } }