Fix handling feed

This commit is contained in:
Arkadiusz Fal
2022-12-14 17:23:04 +01:00
parent 2812ea0301
commit b55c6f8619
4 changed files with 14 additions and 30 deletions

View File

@@ -106,6 +106,12 @@ final class FeedModel: ObservableObject, CacheModel {
loadFeed(force: true, paginating: true)
}
func onAccountChange() {
reset()
loadResources(force: true)
calculateUnwatchedFeed()
}
func calculateUnwatchedFeed() {
guard let account = accounts.current, accounts.signedIn else { return }
let feed = cacheModel.retrieveFeed(account: account)