mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 14:25:38 +02:00
messagewebview: reload mainview if webengineview does not finish loading js
Gitlab: #134 Change-Id: I0d6406b80ad80cc7278e395bd51d0d7b02538aa0
This commit is contained in:
parent
3e5ee2fb8e
commit
54093e5c96
2 changed files with 16 additions and 1 deletions
|
@ -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);")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue