#35 Close toast when app is suspended or closed: added hide() function, for iOS and Android only for now

This commit is contained in:
EddyVerbruggen
2015-05-21 21:24:03 +02:00
parent 4593549f41
commit 7ada5fbaa7
5 changed files with 18 additions and 6 deletions
+1 -3
View File
@@ -32,10 +32,8 @@ public class Toast extends CordovaPlugin {
if (ACTION_HIDE_EVENT.equals(action)) {
if (mostRecentToast != null) {
mostRecentToast.cancel();
callbackContext.success();
} else {
callbackContext.error("No Toast has been shows yet");
}
callbackContext.success();
return true;
} else if (ACTION_SHOW_EVENT.equals(action)) {