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