mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Don't delay hiding the progress bar unless we are animating it.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user