Don't delay hiding the progress bar unless we are animating it.
This commit is contained in:
parent
b0fc1eccca
commit
807b2d3109
|
@ -67,9 +67,10 @@ private extension RefreshProgressView {
|
|||
if isInViewHierarchy {
|
||||
progressView.setProgress(1, animated: animated)
|
||||
}
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
|
||||
func completeLabel() {
|
||||
// Check that there are no pending downloads.
|
||||
if (AccountManager.shared.combinedRefreshProgress.isComplete) {
|
||||
if AccountManager.shared.combinedRefreshProgress.isComplete {
|
||||
self.updateRefreshLabel()
|
||||
self.label.isHidden = false
|
||||
self.progressView.isHidden = true
|
||||
|
@ -78,6 +79,14 @@ private extension RefreshProgressView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if animated {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
completeLabel()
|
||||
}
|
||||
} else {
|
||||
completeLabel()
|
||||
}
|
||||
} else {
|
||||
label.isHidden = true
|
||||
progressView.isHidden = false
|
||||
|
|
Loading…
Reference in New Issue