File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ private extension FavoritesCarouselView {
126126 } )
127127
128128 Button ( action: {
129- self . appState. funkyRedPandaModeEnabled. toggle ( )
129+ self . appState. $ funkyRedPandaModeEnabled. toggle ( )
130130 } , label: {
131131 Image ( systemName: " sun.max.circle.fill " )
132132 . opacity ( self . images. isEmpty ? 0.0 : 1.0 )
Original file line number Diff line number Diff line change 11import Foundation
22import Observation
3+ import SwiftUI
34
45/// The @``SecurelyStoredValue`` property wrapper automagically persists a single `Item` in the system `Keychain`
56/// rather than an array of items that would be persisted in a ``Store`` or using @``Stored``.
@@ -50,7 +51,7 @@ import Observation
5051@MainActor
5152@Observable
5253@propertyWrapper
53- public final class SecurelyStoredValue < Item: StorableItem > {
54+ public final class SecurelyStoredValue < Item: StorableItem > : DynamicProperty {
5455 private let observationRegistrar = ObservationRegistrar ( )
5556 private let valueSubject = AsyncValueSubject < Item ? > ( nil )
5657
Original file line number Diff line number Diff line change 11import Foundation
22import Observation
3+ import SwiftUI
34
45/// The @``StoredValue`` property wrapper to automagically persist a single `Item` in `UserDefaults`
56/// rather than an array of items that would be persisted in a ``Store`` or using @``Stored``.
@@ -55,7 +56,7 @@ import Observation
5556@MainActor
5657@Observable
5758@propertyWrapper
58- public final class StoredValue < Item: StorableItem > {
59+ public final class StoredValue < Item: StorableItem > : DynamicProperty {
5960 private let observationRegistrar = ObservationRegistrar ( )
6061 private let valueSubject : AsyncValueSubject < Item >
6162 private let cachedValue : CachedValue < Item >
@@ -95,7 +96,7 @@ public final class StoredValue<Item: StorableItem> {
9596
9697 /// The currently stored value
9798 public var wrappedValue : Item {
98- self . cachedValue . wrappedValue
99+ self . retrieveItem ( )
99100 }
100101
101102 /// A ``StoredValue`` which exposes ``set(_:)`` and ``reset()`` functions alongside an `AsyncStream` of ``values``.
You can’t perform that action at this time.
0 commit comments