mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
Do not reload channels cache if not needed
This commit is contained in:
parent
3bbc2df431
commit
f3a8a0977c
@ -68,15 +68,15 @@ 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 ? self.resource?.load() : self.resource?.loadIfNeeded()
|
||||
|
||||
if request != nil {
|
||||
self.isLoading = true
|
||||
}
|
||||
self.isLoading = true
|
||||
|
||||
request?
|
||||
.onCompletion { [weak self] _ in
|
||||
|
Loading…
Reference in New Issue
Block a user