From aba4a2bdea6383d2d265a97f3f3b96585f10d998 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sat, 3 Aug 2019 16:39:00 -0700 Subject: [PATCH] Address redirect problem with new login issue #49 --- assets/WebViewSheet.qml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/WebViewSheet.qml b/assets/WebViewSheet.qml index cf92efc..93d1129 100644 --- a/assets/WebViewSheet.qml +++ b/assets/WebViewSheet.qml @@ -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; + } } } }