mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Update refresh progress view so that it updates at a minimum of every 60 seconds.
This commit is contained in:
@@ -23,6 +23,8 @@ class RefreshProgressView: UIView {
|
||||
} else {
|
||||
updateRefreshLabel()
|
||||
}
|
||||
|
||||
scheduleUpdateRefreshLabel()
|
||||
}
|
||||
|
||||
func updateRefreshLabel() {
|
||||
@@ -87,4 +89,12 @@ private extension RefreshProgressView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func scheduleUpdateRefreshLabel() {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 60) { [weak self] in
|
||||
self?.updateRefreshLabel()
|
||||
self?.scheduleUpdateRefreshLabel()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user