From d8bd825788c7cc4cd5b6d28262e74afd32fec2f8 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Fri, 5 Mar 2021 21:49:47 -0800 Subject: [PATCH] Ensure main thread --- .../ViewModels/View Models/CollectionItemsViewModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift b/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift index ea1c2cf..6d22592 100644 --- a/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift +++ b/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift @@ -250,6 +250,7 @@ extension CollectionItemsViewModel: CollectionViewModel { .sink { _ in } .store(in: &requestCancellables) collectionService.requestMarkerLastReadId() + .receive(on: DispatchQueue.main) .sink { _ in } receiveValue: { [weak self] in self?.markerLastReadId = $0 } .store(in: &cancellables)