Timeline only clear cache if previous value was .home

This commit is contained in:
Thomas Ricouard 2023-02-27 06:23:03 +01:00
parent f22671cc66
commit b75dd65ac4
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ class TimelineViewModel: ObservableObject {
timelineTask?.cancel()
timelineTask = Task {
if timeline == .latest {
await clearHomeCache()
if oldValue == .home {
await clearHomeCache()
}
timeline = oldValue
}
if oldValue != timeline {