Skip to content

timers.clearInterval doesn't work on Android #817

@atanasovg

Description

@atanasovg

The following code doesn't clear the interval and the callback gets executed infinitely:

mV = vm.progressViewModel.get("maxValue"); // 100
    vm.progressViewModel.set("currentValue", 0);

    // create a repeating timer to jump our progress value
    t = timer.setInterval(function () {
        var cV = vm.progressViewModel.get("currentValue");
        var nV = cV + 5;
        console.log("new: " + nV + ", max: " + mV);
        if (nV >= mV) {
            console.log(">=!!!");
            timer.clearInterval(t);
        } else {
            vm.progressViewModel.set("currentValue", nV);
        }
    }, 500);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions