mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-18 08:35:26 +08:00
chatview: fix footer visibility
Change-Id: I4bb6268547da6549a143da1d64b56f70cdd7dcc7
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user