From 32f557866ac82658a69bd74db3251ffae202fa44 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Mon, 18 Jan 2021 19:24:43 -0800 Subject: [PATCH] Fix scroll interruption --- View Controllers/TableViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/View Controllers/TableViewController.swift b/View Controllers/TableViewController.swift index e6ec854..6c52ff1 100644 --- a/View Controllers/TableViewController.swift +++ b/View Controllers/TableViewController.swift @@ -254,12 +254,12 @@ private extension TableViewController { .sink { [weak self] in guard let self = self else { return } - if !$0 { + let refreshControlVisibile = self.refreshControl?.isRefreshing ?? false + + if !$0, refreshControlVisibile { self.refreshControl?.endRefreshing() } - let refreshControlVisibile = self.refreshControl?.isRefreshing ?? false - self.tableView.tableFooterView = $0 && !refreshControlVisibile ? self.loadingTableFooterView : UIView() self.sizeTableHeaderFooterViews() }