Skip to content

[BUG] Timer freezes during heavy scrolling #13

@moz850

Description

@moz850

When this bug was fixed: #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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions