Merge pull request #118 from patrickfrisch/master

Remove show toast method call from cancel timer to ensure that toast show is called only once.
This commit is contained in:
Eddy Verbruggen 2018-08-22 09:35:11 +02:00 committed by GitHub
commit e4e18f143a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,7 +192,7 @@ public class Toast extends CordovaPlugin {
}
// trigger show every 2500 ms for as long as the requested duration
_timer = new CountDownTimer(hideAfterMs, 2500) {
public void onTick(long millisUntilFinished) {toast.show();}
public void onTick(long millisUntilFinished) { }
public void onFinish() {
returnTapEvent("hide", msg, data, callbackContext);
toast.cancel();