mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Refresh views on entering foreground
This commit is contained in:
@@ -158,6 +158,12 @@ struct PlaylistsView: View {
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(RefreshControl.navigationBarTitleDisplayMode)
|
||||
#endif
|
||||
#if !os(macOS)
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||
model.load()
|
||||
resource?.loadIfNeeded()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if os(tvOS)
|
||||
|
Reference in New Issue
Block a user