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 {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue