diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index 58eb4c3ac5..73e4d71186 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -124,7 +124,7 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro private func applyInitialSnapshot() { if case .public(let local) = timeline, (local && !Preferences.shared.hasShownLocalTimelineDescription) || - (!local && Preferences.shared.hasShownFederatedTimelineDescription) { + (!local && !Preferences.shared.hasShownFederatedTimelineDescription) { var snapshot = dataSource.snapshot() snapshot.appendSections([.header]) snapshot.appendItems([.publicTimelineDescription], toSection: .header) @@ -144,6 +144,19 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro } } + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + if isShowingTimelineDescription, + case .public(let local) = timeline { + if local { + Preferences.shared.hasShownLocalTimelineDescription = true + } else { + Preferences.shared.hasShownFederatedTimelineDescription = true + } + } + } + override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated)