Partial fix for CB-1742, still don't know what this should do for notification.confirm's cancel, so we return zero for now

This commit is contained in:
Joe Bowser 2012-10-25 14:13:17 -07:00 committed by Simon MacDonald
parent f270cde47d
commit 9c98625610

View File

@ -163,6 +163,14 @@ public class Notification extends CordovaPlugin {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0)); callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
} }
}); });
dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
public void onCancel(DialogInterface dialog)
{
dialog.dismiss();
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
}
});
dlg.create(); dlg.create();
dlg.show(); dlg.show();
}; };
@ -225,6 +233,13 @@ public class Notification extends CordovaPlugin {
} }
); );
} }
dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
public void onCancel(DialogInterface dialog)
{
dialog.dismiss();
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
}
});
dlg.create(); dlg.create();
dlg.show(); dlg.show();