DotLoadersPack-Android
DotLoadersPack-Android copied to clipboard
Bug: multiple onVisibleChanged calls on LinearDotsLoader leads to multiple scheduled Timer instances
bug in these lines https://github.com/agrawalsuneet/DotLoadersPack-Android/blob/master/dotsloader/src/main/java/com/agrawalsuneet/dotsloader/loaders/LinearDotsLoader.kt#L90-L98
fix is to add cancelling before timer instantiation and scheduling to eliminate racing of cancel vs create&schedule.
private fun scheduleTimer() {
timer?.cancel()
timer = Timer()
Reproducible when I created multiple LinearDotsLoader programmatically and one by one show/hide them.