moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

fix: Initialize localStorage idling value to false in constructor #38

Closed roupify closed 7 years ago

roupify commented 7 years ago

If AutoResume.NotIdle is set, the idling value must be to false in localStorage, otherwise, on startup, if the value is at true, no interrupt will emit.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

Idling initial value wasn't set in localStorage, only in idle property.

What is the new behavior?

We initialize the idling value in localStorage at startup.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[X] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.326% when pulling ab7143316d5c759831a9d37a2030ebd0c6834721 on rousseaufiliong:master into e3a0b2b3a6b81ac435a949d83af02c740337f2d3 on HackedByChinese:master.