Update refresh progress view so that it updates at a minimum of every 60 seconds.
This commit is contained in:
parent
a5cc892464
commit
4f6e7dc4a8
|
@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue