refactor: correct self capture

This commit is contained in:
Vlad Suhomlinov 2021-09-16 00:59:21 +03:00
parent 91c15c21ed
commit d23257e963
1 changed files with 3 additions and 1 deletions

View File

@ -155,7 +155,9 @@ private extension TITimer {
func startDispatchSourceTimer(interval: TimeInterval, queue: DispatchQueue) -> Invalidatable? {
let timer = DispatchSource.makeTimerSource(flags: [], queue: queue)
timer.schedule(deadline: .now() + interval, repeating: interval)
timer.setEventHandler(handler: handleSourceUpdate)
timer.setEventHandler() { [weak self] in
self?.handleSourceUpdate()
}
timer.resume()