mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-30 11:43:36 +02:00
fix: in-call chat view opening and closing
- fixes the in-call chat view requiring reselection to open - fixes the in-call chat view staying open, on top of the principal chat view when a call ends Gitlab: #415 Gitlab: #416 Change-Id: Idcfaaf263d5d53451dedf955ce441f0a705309a9
This commit is contained in:
parent
2bca28b7f3
commit
c8008c5414
5 changed files with 53 additions and 53 deletions
|
@ -51,15 +51,23 @@ Rectangle {
|
|||
closeInCallConversation)
|
||||
}
|
||||
|
||||
function openInCallConversation() {
|
||||
if (linkedWebview) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(false)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(false)
|
||||
}
|
||||
inAudioCallMessageWebViewStack.visible = true
|
||||
inAudioCallMessageWebViewStack.push(linkedWebview)
|
||||
}
|
||||
|
||||
function closeInCallConversation() {
|
||||
if (inAudioCallMessageWebViewStack.visible) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(
|
||||
true)
|
||||
if (linkedWebview) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(true)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(true)
|
||||
}
|
||||
inAudioCallMessageWebViewStack.visible = false
|
||||
inAudioCallMessageWebViewStack.clear()
|
||||
}
|
||||
}
|
||||
|
||||
function closeContextMenuAndRelatedWindows() {
|
||||
audioCallOverlay.closePotentialContactPicker()
|
||||
|
@ -136,22 +144,9 @@ Rectangle {
|
|||
}
|
||||
|
||||
onOverlayChatButtonClicked: {
|
||||
if (inAudioCallMessageWebViewStack.visible) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(
|
||||
true)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(
|
||||
true)
|
||||
inAudioCallMessageWebViewStack.visible = false
|
||||
inAudioCallMessageWebViewStack.clear()
|
||||
} else {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(
|
||||
false)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(
|
||||
false)
|
||||
inAudioCallMessageWebViewStack.visible = true
|
||||
inAudioCallMessageWebViewStack.push(
|
||||
linkedWebview)
|
||||
}
|
||||
inAudioCallMessageWebViewStack.visible ?
|
||||
closeInCallConversation() :
|
||||
openInCallConversation()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,8 @@ Rectangle {
|
|||
|
||||
signal overlayChatButtonClicked
|
||||
|
||||
onVisibleChanged: if (!visible) callViewContextMenu.close()
|
||||
|
||||
function setRecording(localIsRecording) {
|
||||
callViewContextMenu.localIsRecording = localIsRecording
|
||||
recordingRect.visible = localIsRecording
|
||||
|
|
|
@ -50,26 +50,26 @@ Rectangle {
|
|||
property string responsibleConvUid: ""
|
||||
property string responsibleAccountId: ""
|
||||
|
||||
// TODO: this should all be done by listening to
|
||||
// parent visibility change or parent `Component.onDestruction`
|
||||
function needToCloseInCallConversationAndPotentialWindow() {
|
||||
// Close potential window, context menu releated windows.
|
||||
if (!callStackMainView.currentItem)
|
||||
return
|
||||
if (callStackMainView.currentItem.stackNumber === CallStackView.AudioPageStack) {
|
||||
if (audioCallPage) {
|
||||
audioCallPage.closeInCallConversation()
|
||||
audioCallPage.closeContextMenuAndRelatedWindows()
|
||||
} else if (callStackMainView.currentItem.stackNumber === CallStackView.VideoPageStack) {
|
||||
}
|
||||
if (videoCallPage) {
|
||||
videoCallPage.closeInCallConversation()
|
||||
videoCallPage.closeContextMenuAndRelatedWindows()
|
||||
}
|
||||
}
|
||||
|
||||
function setLinkedWebview(webViewId) {
|
||||
if (callStackMainView.currentItem.stackNumber === CallStackView.AudioPageStack) {
|
||||
if (audioCallPage)
|
||||
audioCallPage.setLinkedWebview(webViewId)
|
||||
} else if (callStackMainView.currentItem.stackNumber === CallStackView.VideoPageStack) {
|
||||
if (videoCallPage)
|
||||
videoCallPage.setLinkedWebview(webViewId)
|
||||
}
|
||||
}
|
||||
|
||||
function getItemFromStack(itemNumber) {
|
||||
return callStackMainView.find(function (item) {
|
||||
|
|
|
@ -44,6 +44,14 @@ Item {
|
|||
signal pluginItemClicked
|
||||
signal transferCallButtonClicked
|
||||
|
||||
function close() {
|
||||
// leave this debug line is a reminder of a design failure
|
||||
console.debug("call view context menu close")
|
||||
const menu = ContextMenuGenerator.getMenu()
|
||||
if (menu)
|
||||
menu.close()
|
||||
}
|
||||
|
||||
function openMenu(){
|
||||
ContextMenuGenerator.initMenu()
|
||||
if (isSIP){
|
||||
|
|
|
@ -63,15 +63,23 @@ Rectangle {
|
|||
closeInCallConversation)
|
||||
}
|
||||
|
||||
function openInCallConversation() {
|
||||
if (linkedWebview) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(false)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(false)
|
||||
}
|
||||
inVideoCallMessageWebViewStack.visible = true
|
||||
inVideoCallMessageWebViewStack.push(linkedWebview)
|
||||
}
|
||||
|
||||
function closeInCallConversation() {
|
||||
if (inVideoCallMessageWebViewStack.visible) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(
|
||||
true)
|
||||
if (linkedWebview) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(true)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(true)
|
||||
}
|
||||
inVideoCallMessageWebViewStack.visible = false
|
||||
inVideoCallMessageWebViewStack.clear()
|
||||
}
|
||||
}
|
||||
|
||||
function closeContextMenuAndRelatedWindows() {
|
||||
videoCallOverlay.closePotentialContactPicker()
|
||||
|
@ -200,22 +208,9 @@ Rectangle {
|
|||
}
|
||||
|
||||
onOverlayChatButtonClicked: {
|
||||
if (inVideoCallMessageWebViewStack.visible) {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(
|
||||
true)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(
|
||||
true)
|
||||
inVideoCallMessageWebViewStack.visible = false
|
||||
inVideoCallMessageWebViewStack.clear()
|
||||
} else {
|
||||
linkedWebview.resetMessagingHeaderBackButtonSource(
|
||||
false)
|
||||
linkedWebview.setMessagingHeaderButtonsVisible(
|
||||
false)
|
||||
inVideoCallMessageWebViewStack.visible = true
|
||||
inVideoCallMessageWebViewStack.push(
|
||||
linkedWebview)
|
||||
}
|
||||
inVideoCallMessageWebViewStack.visible ?
|
||||
closeInCallConversation() :
|
||||
openInCallConversation()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue