Fix @Default triggering an extra redraw on appear (#195)

This commit is contained in:
Leo Mehlig 2025-01-05 01:45:07 +01:00 committed by GitHub
parent ef1b2318fb
commit a6fc06aa1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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
}