From 3b83a8cd84ea42583e529d30b6716f3b41da8329 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 19 Sep 2022 18:04:29 +0800 Subject: [PATCH] Only preload non-PDF audio items --- .../OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift index 264cbbcb5..543d23727 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift @@ -152,7 +152,7 @@ import Views // because it will kick off the user's future items being automatically transcribed. // This happens because when an article is saved, we check if the user has a recent // listen. If they do, we will automatically transcribe their message. - if let first = newItems.first?.id { + if let first = newItems.filter({ !$0.isPDF }).first?.id { _ = await audioController.preload(itemIDs: [first]) } }