From 8ffdd4d51f6e7d33ab9b7b1454d955f43140d035 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 9 Jun 2023 17:45:51 +0200 Subject: [PATCH] Fix crash --- Model/Cache/SubscribedChannelsModel.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Model/Cache/SubscribedChannelsModel.swift b/Model/Cache/SubscribedChannelsModel.swift index 32fd2dcc..e2edd885 100644 --- a/Model/Cache/SubscribedChannelsModel.swift +++ b/Model/Cache/SubscribedChannelsModel.swift @@ -68,13 +68,12 @@ final class SubscribedChannelsModel: ObservableObject, CacheModel { return } - let request = force ? resource?.load() : resource?.loadIfNeeded() - guard request != nil else { return } - - loadCachedChannels(account) - DispatchQueue.main.async { [weak self] in guard let self else { return } + let request = force ? resource?.load() : resource?.loadIfNeeded() + guard request != nil else { return } + + loadCachedChannels(account) self.isLoading = true