Skip to content
Snippets Groups Projects
Commit 54093e5c authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

messagewebview: reload mainview if webengineview does not finish loading js

Gitlab: #134
Change-Id: I0d6406b80ad80cc7278e395bd51d0d7b02538aa0
parent 3e5ee2fb
No related branches found
No related tags found
No related merge requests found
......@@ -177,6 +177,19 @@ Window {
// ConversationSmartListViewItemDelegate provides UI information
function setMainView(currentUserDisplayName, currentUserAlias, currentUID,
callStackViewShouldShow, isAudioOnly, callState) {
if (!(communicationPageMessageWebView.jsLoaded)) {
communicationPageMessageWebView.jsLoadedChanged.connect(
function(currentUserDisplayName, currentUserAlias, currentUID,
callStackViewShouldShow, isAudioOnly, callState) {
return function() {
setMainView(currentUserDisplayName, currentUserAlias, currentUID,
callStackViewShouldShow, isAudioOnly, callState)
}
}(currentUserDisplayName, currentUserAlias, currentUID,
callStackViewShouldShow, isAudioOnly, callState))
return
}
if (callStackViewShouldShow) {
if (inSettingsView) {
toggleSettingsView()
......
......@@ -32,6 +32,7 @@ Rectangle {
property int messageWebViewHeaderPreferredHeight: 64
property string headerUserAliasLabelText: ""
property string headerUserUserNameLabelText: ""
property bool jsLoaded: false
signal needToHideConversationInCall
......@@ -256,7 +257,8 @@ Rectangle {
messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/qwebchannel.js"))
messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/chatview.js"))
":/chatview.js"),
function(){jsLoaded = true})
messageWebView.runJavaScript("init_i18n();")
messageWebView.runJavaScript("displayNavbar(false);")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment