mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
defaults move from .observe() to .updates()
https://github.com/sindresorhus/Defaults/releases/tag/v7.0.0
This commit is contained in:
parent
0671b6ef9f
commit
36ecf63b6c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user