Skip to content

Commit

Permalink
Fix @default triggering an extra redraw on appear (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoMehlig authored Jan 5, 2025
1 parent ef1b231 commit a6fc06a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Defaults/SwiftUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extension Defaults {

// The `@MainActor` is important as the `.send()` method doesn't inherit the `@MainActor` from the class.
task = .detached(priority: .userInitiated) { @MainActor [weak self, key] in
for await _ in Defaults.updates(key) {
for await _ in Defaults.updates(key, initial: false) {
guard let self else {
return
}
Expand Down

0 comments on commit a6fc06a

Please sign in to comment.