Address redirect problem with new login issue #49

This commit is contained in:
Morgan McMillian 2019-08-03 16:39:00 -07:00
parent 35289499a8
commit aba4a2bdea

View file

@ -3,6 +3,7 @@ import bb.cascades 1.4
Sheet { Sheet {
peekEnabled: false peekEnabled: false
property alias url: webview.url property alias url: webview.url
property bool authredir: true
Page { Page {
ScrollView { ScrollView {
scrollViewProperties.pinchToZoomEnabled: true scrollViewProperties.pinchToZoomEnabled: true
@ -12,12 +13,15 @@ Sheet {
settings.zoomToFitEnabled: true settings.zoomToFitEnabled: true
onUrlChanged: { onUrlChanged: {
//console.log("::" + url) // console.log("::" + url)
// Workaround for 10.3.3 // Workaround for 10.3.3
if (url.toString().match(/http\:\/\/.*#access_token\=/i)) { if (authredir === true) {
//console.log("Matched url: " + url.toString()); if (url.toString().match(/http\:\/\/.*#access_token\=/i)) {
webview.stop(); // console.log("Matched url: " + url.toString());
webview.url = url.toString(); webview.stop();
webview.url = url.toString();
authredir = false;
}
} }
} }
} }