From 3f370945e623dee91edce3fe982ae83ed540c1fc Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 15 Apr 2024 22:30:20 -0400 Subject: [PATCH] Fix linker errors when building in release mode --- .../TuskerPreferences/Keys/AppearanceKeys.swift | 14 +++++++------- .../TuskerPreferences/Keys/CommonKeys.swift | 8 ++++---- .../Sources/TuskerPreferences/Preference.swift | 8 ++++---- .../Sources/TuskerPreferences/PreferenceKey.swift | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift index 84782db701..c8dfe78ae6 100644 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift +++ b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/AppearanceKeys.swift @@ -8,12 +8,12 @@ import Foundation import UIKit -struct ThemeKey: MigratablePreferenceKey { - static var defaultValue: Theme { .unspecified } +public struct ThemeKey: MigratablePreferenceKey { + public static var defaultValue: Theme { .unspecified } } -struct AccentColorKey: MigratablePreferenceKey { - static var defaultValue: AccentColor { .default } +public struct AccentColorKey: MigratablePreferenceKey { + public static var defaultValue: AccentColor { .default } } struct AvatarStyleKey: MigratablePreferenceKey { @@ -28,10 +28,10 @@ struct TrailingSwipeActionsKey: MigratablePreferenceKey { static var defaultValue: [StatusSwipeAction] { [.reply, .share] } } -struct WidescreenNavigationModeKey: MigratablePreferenceKey { - static var defaultValue: WidescreenNavigationMode { .multiColumn } +public struct WidescreenNavigationModeKey: MigratablePreferenceKey { + public static var defaultValue: WidescreenNavigationMode { .multiColumn } - static func shouldMigrate(oldValue: WidescreenNavigationMode) -> Bool { + public static func shouldMigrate(oldValue: WidescreenNavigationMode) -> Bool { oldValue != .splitScreen } } diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/CommonKeys.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/CommonKeys.swift index 778d191fae..3e2efc04e1 100644 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/CommonKeys.swift +++ b/Packages/TuskerPreferences/Sources/TuskerPreferences/Keys/CommonKeys.swift @@ -7,10 +7,10 @@ import Foundation -struct TrueKey: MigratablePreferenceKey { - static var defaultValue: Bool { true } +public struct TrueKey: MigratablePreferenceKey { + public static var defaultValue: Bool { true } } -struct FalseKey: MigratablePreferenceKey { - static var defaultValue: Bool { false } +public struct FalseKey: MigratablePreferenceKey { + public static var defaultValue: Bool { false } } diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/Preference.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/Preference.swift index ebaf88c289..0c593cf7bf 100644 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/Preference.swift +++ b/Packages/TuskerPreferences/Sources/TuskerPreferences/Preference.swift @@ -89,13 +89,13 @@ final class Preference: Codable { } } -struct PreferencePublisher: Publisher { - typealias Output = Key.Value - typealias Failure = Never +public struct PreferencePublisher: Publisher { + public typealias Output = Key.Value + public typealias Failure = Never let preference: Preference - func receive(subscriber: S) where S : Subscriber, Never == S.Failure, Key.Value == S.Input { + public func receive(subscriber: S) where S : Subscriber, Never == S.Failure, Key.Value == S.Input { preference.$storedValue.map { $0 ?? Key.defaultValue }.receive(subscriber: subscriber) } } diff --git a/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceKey.swift b/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceKey.swift index 90f82e56f7..a3cc08cc10 100644 --- a/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceKey.swift +++ b/Packages/TuskerPreferences/Sources/TuskerPreferences/PreferenceKey.swift @@ -16,7 +16,7 @@ public protocol PreferenceKey { } extension PreferenceKey { - static func didSet(in store: PreferenceStore, newValue: Value) {} + public static func didSet(in store: PreferenceStore, newValue: Value) {} } protocol MigratablePreferenceKey: PreferenceKey where Value: Equatable {