mirror of
https://github.com/yattee/yattee.git
synced 2025-01-08 22:07:10 +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
|
#endif
|
||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
Defaults.observe(.favorites) { _ in
|
Task {
|
||||||
favoritesChanged.toggle()
|
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)
|
.redrawOn(change: favoritesChanged)
|
||||||
|
Loading…
Reference in New Issue
Block a user