Address redirect problem with new login issue #49
This commit is contained in:
parent
35289499a8
commit
aba4a2bdea
1 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue