Fix timeline reloading every time VC appears

Caused by changes to TimelineLikeController required to let list
timelines reload from scratch
This commit is contained in:
Shadowfacts 2022-11-01 21:52:28 -04:00
parent 5de0c034f4
commit ba032412eb
2 changed files with 6 additions and 2 deletions

View File

@ -156,9 +156,11 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie
} }
Task { Task {
if case .notLoadedInitial = await controller.state {
await load() await load()
} }
} }
}
func setAccountID(_ id: String) { func setAccountID(_ id: String) {
self.accountID = id self.accountID = id

View File

@ -140,9 +140,11 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro
} }
Task { Task {
if case .notLoadedInitial = await controller.state {
await controller.loadInitial() await controller.loadInitial()
} }
} }
}
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)