remove guard for loadItems call

This commit is contained in:
Satindar Dhillon 2022-05-20 08:49:47 -07:00
parent 9f85adc02d
commit 9858cc8413

View file

@ -94,10 +94,7 @@ private let enableGrid = UIDevice.isIPad || FeatureFlag.enableGridCardsOnPhone
.navigationTitle("Home")
.navigationBarTitleDisplayMode(.inline)
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
// Don't refresh the list if the user is currently reading an article
if viewModel.selectedLinkItem == nil || viewModel.linkRequest == nil {
loadItems(isRefresh: true)
}
loadItems(isRefresh: true)
}
.onReceive(NotificationCenter.default.publisher(for: Notification.Name("PushJSONArticle"))) { notification in
guard let jsonArticle = notification.userInfo?["article"] as? JSONArticle else { return }