forked from github/Toast-PhoneGap-Plugin
cleanup
This commit is contained in:
parent
d81936a08a
commit
8d4a3d646c
@ -24,9 +24,9 @@ var toastProxy = {
|
|||||||
successCallback({
|
successCallback({
|
||||||
event: "touch",
|
event: "touch",
|
||||||
message: options[0].message,
|
message: options[0].message,
|
||||||
data: options[0].data,
|
data: options[0].data
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
toast.ondismissed = function (event) {
|
toast.ondismissed = function (event) {
|
||||||
toastProxy.lastDisplayedNotification = null;
|
toastProxy.lastDisplayedNotification = null;
|
||||||
@ -35,12 +35,12 @@ var toastProxy = {
|
|||||||
message: options[0].message,
|
message: options[0].message,
|
||||||
data: options[0].data
|
data: options[0].data
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
toast.onfailed = function(err) {
|
toast.onfailed = function(err) {
|
||||||
toastProxy.lastDisplayedNotification = null;
|
toastProxy.lastDisplayedNotification = null;
|
||||||
errorCallback(err);
|
errorCallback(err);
|
||||||
}
|
};
|
||||||
|
|
||||||
notifications.ToastNotificationManager.createToastNotifier().show(toast);
|
notifications.ToastNotificationManager.createToastNotifier().show(toast);
|
||||||
},
|
},
|
||||||
@ -51,6 +51,6 @@ var toastProxy = {
|
|||||||
this.lastDisplayedNotification = null;
|
this.lastDisplayedNotification = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
cordova.commandProxy.add("Toast", toastProxy);
|
cordova.commandProxy.add("Toast", toastProxy);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user