Check for initial appearance

This commit is contained in:
Justin Mazzocchi 2022-11-27 22:42:27 -08:00
parent 3a5ebddad5
commit 0e46a0eb28

View file

@ -23,6 +23,7 @@ class TableViewController: UITableViewController {
private var shouldKeepPlayingVideoAfterDismissal = false private var shouldKeepPlayingVideoAfterDismissal = false
private var newItemsViewHiddenConstraint: NSLayoutConstraint? private var newItemsViewHiddenConstraint: NSLayoutConstraint?
private var newItemsViewVisibleConstraint: NSLayoutConstraint? private var newItemsViewVisibleConstraint: NSLayoutConstraint?
private var isPastInitialAppearance = false
private let insetBottom: Bool private let insetBottom: Bool
private weak var parentNavigationController: UINavigationController? private weak var parentNavigationController: UINavigationController?
@ -103,9 +104,13 @@ class TableViewController: UITableViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
if isPastInitialAppearance {
refreshIfAble() refreshIfAble()
} }
isPastInitialAppearance = true
}
override func scrollViewDidScroll(_ scrollView: UIScrollView) { override func scrollViewDidScroll(_ scrollView: UIScrollView) {
guard scrollView.isDragging else { return } guard scrollView.isDragging else { return }