mirror of
https://github.com/yattee/yattee.git
synced 2025-10-15 20:08:18 +00:00
Refresh views on entering foreground
This commit is contained in:
@@ -50,6 +50,11 @@ struct SubscriptionsView: View {
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(RefreshControl.navigationBarTitleDisplayMode)
|
||||
#endif
|
||||
#if !os(macOS)
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||
loadResources()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private func loadResources(force: Bool = false, onCompletion: @escaping () -> Void = {}) {
|
||||
|
Reference in New Issue
Block a user