diff --git a/Shared/Home/HomeView.swift b/Shared/Home/HomeView.swift index 308b58e7..19822d0a 100644 --- a/Shared/Home/HomeView.swift +++ b/Shared/Home/HomeView.swift @@ -116,14 +116,14 @@ struct HomeView: View { #endif } .onAppear { - Defaults.observe(.favorites) { _ in - favoritesChanged.toggle() + Task { + for await _ in Defaults.updates(.favorites) { + favoritesChanged.toggle() + } + for await _ in Defaults.updates(.widgetsSettings) { + favoritesChanged.toggle() + } } - .tieToLifetime(of: accounts) - Defaults.observe(.widgetsSettings) { _ in - favoritesChanged.toggle() - } - .tieToLifetime(of: accounts) } .redrawOn(change: favoritesChanged) diff --git a/Yattee.xcodeproj/project.pbxproj b/Yattee.xcodeproj/project.pbxproj index 3bb2b123..5f610fc6 100644 --- a/Yattee.xcodeproj/project.pbxproj +++ b/Yattee.xcodeproj/project.pbxproj @@ -4627,7 +4627,7 @@ repositoryURL = "https://github.com/sindresorhus/Defaults"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 6.0.0; + minimumVersion = 7.0.0; }; }; 372AA40E286D067B0000B1DC /* XCRemoteSwiftPackageReference "Repeat" */ = { diff --git a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0029ddee..96001ce9 100644 --- a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/sindresorhus/Defaults", "state" : { - "revision" : "981ccb0a01c54abbe3c12ccb8226108527bbf115", - "version" : "6.3.0" + "revision" : "3efef5a28ebdbbe922d4a2049493733ed14475a6", + "version" : "7.3.1" } }, {