From ba032412eb5c09b8be963e685337ac07286e1f45 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 1 Nov 2022 21:52:28 -0400 Subject: [PATCH] Fix timeline reloading every time VC appears Caused by changes to TimelineLikeController required to let list timelines reload from scratch --- Tusker/Screens/Profile/ProfileStatusesViewController.swift | 4 +++- Tusker/Screens/Timeline/TimelineViewController.swift | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Profile/ProfileStatusesViewController.swift b/Tusker/Screens/Profile/ProfileStatusesViewController.swift index 9ddc999785..85e1f34d58 100644 --- a/Tusker/Screens/Profile/ProfileStatusesViewController.swift +++ b/Tusker/Screens/Profile/ProfileStatusesViewController.swift @@ -156,7 +156,9 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie } Task { - await load() + if case .notLoadedInitial = await controller.state { + await load() + } } } diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index 403e37fd6a..55a9498ea0 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -140,7 +140,9 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro } Task { - await controller.loadInitial() + if case .notLoadedInitial = await controller.state { + await controller.loadInitial() + } } }