mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2026-04-28 00:00:04 +08:00
#35 Close toast when app is suspended or closed: added hide() function, for iOS and Android only for now
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user