mirror of
https://github.com/yattee/yattee.git
synced 2026-04-10 01:26:57 +00:00
Fix HomeView data staleness on new watch entries, tab switches, and settings dismissal
Post watchHistoryDidChange notification when a new watch entry is inserted during local playback progress updates (but not on every progress tick). Reload Home data when switching back to the Home tab and when the Customize Home sheet is dismissed.
This commit is contained in:
@@ -134,6 +134,16 @@ struct HomeView: View {
|
||||
loadData()
|
||||
}
|
||||
}
|
||||
.onChange(of: appEnvironment?.navigationCoordinator.selectedTab) { _, newTab in
|
||||
if newTab == .home {
|
||||
loadData()
|
||||
}
|
||||
}
|
||||
.onChange(of: showingCustomizeHome) { _, isShowing in
|
||||
if !isShowing {
|
||||
loadData()
|
||||
}
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .bookmarksDidChange)) { _ in
|
||||
loadBookmarksData()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user