mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let request = force ? resource?.load() : resource?.loadIfNeeded()
|
||||||
|
guard request != nil else { return }
|
||||||
|
|
||||||
loadCachedChannels(account)
|
loadCachedChannels(account)
|
||||||
|
|
||||||
DispatchQueue.main.async { [weak self] in
|
DispatchQueue.main.async { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
let request = force ? self.resource?.load() : self.resource?.loadIfNeeded()
|
|
||||||
|
|
||||||
if request != nil {
|
self.isLoading = true
|
||||||
self.isLoading = true
|
|
||||||
}
|
|
||||||
|
|
||||||
request?
|
request?
|
||||||
.onCompletion { [weak self] _ in
|
.onCompletion { [weak self] _ in
|
||||||
|
Loading…
Reference in New Issue
Block a user