forked from shadowfacts/Tusker
parent
81e10326d3
commit
412e4a4dc5
|
@ -124,7 +124,7 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro
|
||||||
private func applyInitialSnapshot() {
|
private func applyInitialSnapshot() {
|
||||||
if case .public(let local) = timeline,
|
if case .public(let local) = timeline,
|
||||||
(local && !Preferences.shared.hasShownLocalTimelineDescription) ||
|
(local && !Preferences.shared.hasShownLocalTimelineDescription) ||
|
||||||
(!local && Preferences.shared.hasShownFederatedTimelineDescription) {
|
(!local && !Preferences.shared.hasShownFederatedTimelineDescription) {
|
||||||
var snapshot = dataSource.snapshot()
|
var snapshot = dataSource.snapshot()
|
||||||
snapshot.appendSections([.header])
|
snapshot.appendSections([.header])
|
||||||
snapshot.appendItems([.publicTimelineDescription], toSection: .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) {
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
super.viewDidDisappear(animated)
|
super.viewDidDisappear(animated)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue