diff --git a/Classes/Notifications/NotificationModelController.swift b/Classes/Notifications/NotificationModelController.swift index c0549a946..d21143525 100644 --- a/Classes/Notifications/NotificationModelController.swift +++ b/Classes/Notifications/NotificationModelController.swift @@ -51,13 +51,6 @@ final class NotificationModelController { width: CGFloat, completion: @escaping (Result<([NotificationViewModel], Int?)>) -> Void ) { - // hack to prevent double-fetching notifications when awaking from bg fetch - guard UIApplication.shared.applicationState != .background else { - // return success to avoid error states - completion(.success(([], nil))) - return - } - let badge = githubClient.badge let contentSizeCategory = UIContentSizeCategory.preferred // TODO move handling + parsing to a single method? diff --git a/Classes/Systems/Feed.swift b/Classes/Systems/Feed.swift index 24ec2cf6f..baa20cc3a 100644 --- a/Classes/Systems/Feed.swift +++ b/Classes/Systems/Feed.swift @@ -76,7 +76,10 @@ final class Feed: NSObject, UIScrollViewDelegate { view.backgroundColor = .white - refresh() + // avoid app launch in the background triggering viewDidLoad-based network calls + if UIApplication.shared.applicationState != .background { + refresh() + } adapter.collectionView = collectionView