Update refresh progress view so that it updates at a minimum of every 60 seconds.

This commit is contained in:
Maurice Parker 2020-01-08 18:07:58 -07:00
parent a5cc892464
commit 4f6e7dc4a8
1 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,8 @@ class RefreshProgressView: UIView {
} else { } else {
updateRefreshLabel() updateRefreshLabel()
} }
scheduleUpdateRefreshLabel()
} }
func updateRefreshLabel() { func updateRefreshLabel() {
@ -87,4 +89,12 @@ private extension RefreshProgressView {
} }
} }
} }
func scheduleUpdateRefreshLabel() {
DispatchQueue.main.asyncAfter(deadline: .now() + 60) { [weak self] in
self?.updateRefreshLabel()
self?.scheduleUpdateRefreshLabel()
}
}
} }