#59 Add specific duration of the toast

This commit is contained in:
EddyVerbruggen
2016-03-17 21:23:19 +01:00
parent 4fb9932c9b
commit fe1aed17e3
7 changed files with 102 additions and 107 deletions
+2 -1
View File
@@ -16,7 +16,7 @@ Toast.prototype.optionsBuilder = function () {
},
withDuration: function(d) {
duration = d;
duration = d.toString();
return this;
},
@@ -43,6 +43,7 @@ Toast.prototype.optionsBuilder = function () {
Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) {
options.duration = (options.duration === undefined ? 'long' : options.duration.toString());
cordova.exec(successCallback, errorCallback, "Toast", "show", [options]);
};