From 3f13fe62ee07a6eebd5633c6e45504ea0a2e18ff Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 21 Apr 2022 12:56:12 -0700 Subject: [PATCH] remove sendProgressUpdates flag --- .../Sources/App/Views/Home/HomeFeedViewIOS.swift | 6 ------ .../Sources/App/Views/Home/HomeFeedViewModel.swift | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 343503e49..36618bd0d 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -260,9 +260,6 @@ import Views } } } - .onAppear { - viewModel.sendProgressUpdates = false - } } } @@ -331,9 +328,6 @@ import Views LoadingSection() } } - .onAppear { - viewModel.sendProgressUpdates = true - } } } diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift index 8da3422cb..b86141403 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift @@ -25,7 +25,6 @@ import Views @Published var selectedLinkItem: FeedItemDep? var cursor: String? - var sendProgressUpdates = false // These are used to make sure we handle search result // responses in the right order @@ -191,7 +190,7 @@ import Views } private func updateProgress(itemID: String, progress: Double) { - guard sendProgressUpdates, let item = items.first(where: { $0.id == itemID }) else { return } + guard let item = items.first(where: { $0.id == itemID }) else { return } if let index = items.firstIndex(of: item) { items[index].readingProgress = progress }