Skip to content

Commit

Permalink
Slightly better urlChanged listener
Browse files Browse the repository at this point in the history
  • Loading branch information
b100dian committed Nov 14, 2020
1 parent c1d2312 commit 468cde1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qml/pages/LoginPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ WebViewPage {
active: true
url: page.startUrl + "&state=" + page.processId

onLinkClicked: {
// This is currently not called for redirects (at least not in sailfish-components-webview 1.1.6.1
onUrlChanged: {
// This is currently not called for redirects (at least not in sailfish-components-webview 1.1.6.1).
// so I just leave this here in case it starts working, otherwise AuthServer is actually listening on 3000.
var request = {url: url};
// See also https://git.sailfishos.org/mer-core/qtmozembed/blob/master/src/qmozview_defined_wrapper.h
// which is wrapped in RawWebView https://github.com/sailfishos/sailfish-components-webview/blob/jb51257/1.1.6.1/import/webview/rawwebview.h
var request = {url: String(webView.url)};
if (isReturnUrl(request.url)) {
visible = false
request.action = WebView.IgnoreRequest
Expand Down

0 comments on commit 468cde1

Please sign in to comment.