diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift index d84a53f9c7..a535fcd2cc 100644 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift +++ b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift @@ -31,3 +31,15 @@ struct TrailingSwipeActionsKey: PreferenceKey { struct WidescreenNavigationModeKey: PreferenceKey { static var defaultValue: WidescreenNavigationMode { .splitScreen } } + +struct AttachmentBlurModeKey: PreferenceKey { + 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 + } + } +} diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/MediaKeys.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/MediaKeys.swift deleted file mode 100644 index f7c3d54887..0000000000 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/MediaKeys.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// MediaKeys.swift -// TuskerPreferences -// -// Created by Shadowfacts on 4/13/24. -// - -import Foundation - -struct AttachmentBlurModeKey: PreferenceKey { - 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 - } - } -} diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceStore.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceStore.swift index fd74cc3a47..a3a52f0654 100644 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceStore.swift +++ b/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceStore.swift @@ -25,7 +25,13 @@ public final class PreferenceStore: ObservableObject, Codable { @Preference public var widescreenNavigationMode @Preference public var underlineTextLinks @Preference public var showAttachmentsInTimeline - + @Preference public var attachmentBlurMode + @Preference public var blurMediaBehindContentWarning + @Preference public var automaticallyPlayGifs + @Preference public var showUncroppedMediaInline + @Preference public var showAttachmentBadges + @Preference public var attachmentAltBadgeInverted + // MARK: Composing @Preference public var defaultPostVisibility @Preference public var defaultReplyVisibility @@ -34,14 +40,6 @@ public final class PreferenceStore: ObservableObject, Codable { @Preference public var mentionReblogger @Preference public var useTwitterKeyboard - // MARK: Media - @Preference public var attachmentBlurMode - @Preference public var blurMediaBehindContentWarning - @Preference public var automaticallyPlayGifs - @Preference public var showUncroppedMediaInline - @Preference public var showAttachmentBadges - @Preference public var attachmentAltBadgeInverted - // MARK: Behavior @Preference public var openLinksInApps @Preference public var useInAppSafari