diff --git a/src/app/mainview/components/ChatView.qml b/src/app/mainview/components/ChatView.qml index 321419237bec4218665049f6de451bda93b69caa..a25a8b6fb01aaf4cb266b70a67e4435a90505fbf 100644 --- a/src/app/mainview/components/ChatView.qml +++ b/src/app/mainview/components/ChatView.qml @@ -21,7 +21,6 @@ import net.jami.Models 1.1 import net.jami.Adapters 1.1 import net.jami.Constants 1.1 import net.jami.Enums 1.1 - import "../../commoncomponents" import "../js/pluginhandlerpickercreation.js" as PluginHandlerPickerCreation @@ -135,7 +134,7 @@ Rectangle { function onIdChanged() { if (!chatViewHeader.interactionButtonsVisibility) - extrasPanel.closePanel() + extrasPanel.closePanel(); } function onNeedsHost() { @@ -251,14 +250,10 @@ Rectangle { chatContents.visible = true; return; } - const isExpanding = width > previousWidth; // Provide a detailed log here, as this function seems problematic. - console.debug("ChatViewSplitView.resolvePanes: f: %1 w: %2 pw: %3 epw: %4 pepw: %5 ie: %6" - .arg(force).arg(width).arg(previousWidth) - .arg(extrasPanelWidth).arg(previousExtrasPanelWidth).arg(isExpanding)); - + console.debug("ChatViewSplitView.resolvePanes: f: %1 w: %2 pw: %3 epw: %4 pepw: %5 ie: %6".arg(force).arg(width).arg(previousWidth).arg(extrasPanelWidth).arg(previousExtrasPanelWidth).arg(isExpanding)); const maximizePredicate = (!isExpanding || force) && chatContents.visible; const minimizePredicate = (isExpanding || force) && !chatContents.visible; const mainViewMinWidth = JamiTheme.mainViewPaneMinWidth; @@ -323,6 +318,7 @@ Rectangle { ChatViewFooter { id: chatViewFooter + objectName: "chatViewFooter" visible: { if (CurrentAccount.type === Profile.Type.SIP) @@ -333,7 +329,7 @@ Rectangle { return false; else if (CurrentConversation.isRequest) return false; - return CurrentConversation.isSwarm; + return CurrentConversation.isSwarm || CurrentConversation.isTemporary; } onHeightChanged: { diff --git a/tests/qml/src/tst_ChatView.qml b/tests/qml/src/tst_ChatView.qml index c10bafd37b5f4d5c29d2d45bf7eaea5212d9f253..b58af8c7e81b3bf67a41164dfdfea641bbc42391 100644 --- a/tests/qml/src/tst_ChatView.qml +++ b/tests/qml/src/tst_ChatView.qml @@ -49,6 +49,16 @@ ListSelectionView { var sendContactRequestButton = findChild(chatviewHeader, "sendContactRequestButton") compare(detailsButton.visible, true) compare(sendContactRequestButton.visible, false) + + var chatViewFooter = findChild(uut, "chatViewFooter") + CurrentConversation.isTemporary = true + compare(chatViewFooter.visible, true) + CurrentConversation.isTemporary = false + CurrentConversation.isRequest = true + compare(chatViewFooter.visible, false) + CurrentConversation.isRequest = false + CurrentConversation.needsSyncing = true + compare(chatViewFooter.visible, false) } } }