From 0e46a0eb287db2fa14e96dd9a7bf3fb893e1373a Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sun, 27 Nov 2022 22:42:27 -0800 Subject: [PATCH] Check for initial appearance --- View Controllers/TableViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/View Controllers/TableViewController.swift b/View Controllers/TableViewController.swift index 0759127..53e968a 100644 --- a/View Controllers/TableViewController.swift +++ b/View Controllers/TableViewController.swift @@ -23,6 +23,7 @@ class TableViewController: UITableViewController { private var shouldKeepPlayingVideoAfterDismissal = false private var newItemsViewHiddenConstraint: NSLayoutConstraint? private var newItemsViewVisibleConstraint: NSLayoutConstraint? + private var isPastInitialAppearance = false private let insetBottom: Bool private weak var parentNavigationController: UINavigationController? @@ -103,7 +104,11 @@ class TableViewController: UITableViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - refreshIfAble() + if isPastInitialAppearance { + refreshIfAble() + } + + isPastInitialAppearance = true } override func scrollViewDidScroll(_ scrollView: UIScrollView) {