GitHub user RRutsche opened a pull request:

    https://github.com/apache/cordova-plugin-battery-status/pull/34

    be sure to remove listeners before executing start

    Hi, thanks for your plugin. Works great for us. Only issue we have that the 
initial values for `level` and `isPlugged` were not set after a page reload. 
The native part already registered the listeners and did not update the js part.
    
    regards

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/RRutsche/cordova-plugin-battery-status master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-battery-status/pull/34.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #34
    
----
commit df1cebb388d26d17adefb0aa4afb55e04f5b4448
Author: Richard Rutsche <richardruts...@gmail.com>
Date:   2016-04-13T12:05:40Z

    be sure to remove listeners before executing start
    
    this fixes window reload: there was no initial value for level and 
isPlugged after page reload because native part already registered the listeners

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to