Timer icon indicating copy to clipboard operation
Timer copied to clipboard

[BUG] Timer freezes during heavy scrolling

Open moz850 opened this issue 3 months ago • 0 comments

When this bug was fixed: https://github.com/Mijick/Timer/issues/3

This code was added in MTimerStateManager

  func updateInternalTimerStartAddToRunLoop() {
        #if os(macOS)
        guard let internalTimer = internalTimer else { return }
        RunLoop.main.add(internalTimer, forMode: .common)
        #endif
    }

I had an issue where very active scrolling on screen (iOS) would freeze the timer. When the scroll stopped, the timer would resume. Removed the platform check so that it would use .common for iOS and it works perfectly now:

  func updateInternalTimerStartAddToRunLoop() {
        guard let internalTimer = internalTimer else { return }
        RunLoop.main.add(internalTimer, forMode: .common)
    }

Not sure if it's worth updating this. For me it was super helpful. Thanks for the library, it's been great to work with.

moz850 avatar Oct 22 '25 13:10 moz850