Remove show toast method call from cancel timer to ensure that toast show is called only once.

This commit is contained in:
Patrick Frisch 2018-08-21 16:46:09 +02:00
parent 791beb0bc4
commit 9757e2c04c

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();