From 036aa0be0197b8dd11d2d86f8f4b2d0447ffc261 Mon Sep 17 00:00:00 2001 From: Otavio Cordeiro Date: Tue, 5 Jan 2021 09:08:55 +0100 Subject: [PATCH] Assign value on the main thread --- Pinboarding/Views/Refresh/RefreshViewModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Pinboarding/Views/Refresh/RefreshViewModel.swift b/Pinboarding/Views/Refresh/RefreshViewModel.swift index 684b30e..a1dbaa1 100644 --- a/Pinboarding/Views/Refresh/RefreshViewModel.swift +++ b/Pinboarding/Views/Refresh/RefreshViewModel.swift @@ -19,6 +19,7 @@ final class RefreshViewModel: ObservableObject { self.repository = repository self.activityCancellable = repository.networkActivityPublisher() + .receive(on: RunLoop.main) .map { $0 == .loading } .assign(to: \.isReloading, on: self) }