From 872df224e76009566bffbed716f593c4a78aadeb Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Fri, 18 Mar 2022 19:08:50 +0100 Subject: [PATCH] Fix multi-addresses on search bar Fix hidding send button in chat --- linphone-app/src/components/search/SearchResultModel.cpp | 6 +++--- linphone-app/src/components/settings/SettingsModel.cpp | 6 ++++-- linphone-app/ui/modules/Common/Form/ActionButton.qml | 7 ++++--- linphone-app/ui/modules/Common/Form/DroppableTextArea.qml | 7 +++++-- linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml | 1 + 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/linphone-app/src/components/search/SearchResultModel.cpp b/linphone-app/src/components/search/SearchResultModel.cpp index e47556be8..7ee8bef32 100644 --- a/linphone-app/src/components/search/SearchResultModel.cpp +++ b/linphone-app/src/components/search/SearchResultModel.cpp @@ -29,10 +29,10 @@ SearchResultModel::SearchResultModel(std::shared_ptr linphoneFriend, std::shared_ptr address, QObject * parent) : QObject(parent){ mFriend = linphoneFriend; - if(linphoneFriend && linphoneFriend->getAddress()) - mAddress = linphoneFriend->getAddress()->clone(); - else + if( address) mAddress = address->clone(); + else if(linphoneFriend && linphoneFriend->getAddress()) + mAddress = linphoneFriend->getAddress()->clone(); } QString SearchResultModel::getAddressString() const{ diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index 3c07303c1..857cba0ab 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -654,8 +654,10 @@ int SettingsModel::getAutoDownloadMaxSize() const{ } void SettingsModel::setAutoDownloadMaxSize(int maxSize){ - CoreManager::getInstance()->getCore()->setMaxSizeForAutoDownloadIncomingFiles(maxSize); - emit autoDownloadMaxSizeChanged(maxSize); + if(maxSize != getAutoDownloadMaxSize()){ + CoreManager::getInstance()->getCore()->setMaxSizeForAutoDownloadIncomingFiles(maxSize); + emit autoDownloadMaxSizeChanged(maxSize); + } } // ----------------------------------------------------------------------------- diff --git a/linphone-app/ui/modules/Common/Form/ActionButton.qml b/linphone-app/ui/modules/Common/Form/ActionButton.qml index 1a12fd845..dadd0159a 100644 --- a/linphone-app/ui/modules/Common/Form/ActionButton.qml +++ b/linphone-app/ui/modules/Common/Form/ActionButton.qml @@ -183,9 +183,10 @@ Item { return defaultColor } // --------------------------------------------------------------------------- - - height: iconHeight || iconSize || parent.iconSize || parent.height - width: iconWidth || iconSize || parent.iconSize || parent.width + property int fitHeight: iconHeight || iconSize || parent.iconSize || parent.height + property int fitWidth: iconWidth || iconSize || parent.iconSize || parent.width + height: fitHeight + width: fitWidth Button { id: button diff --git a/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml b/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml index 0ad917f62..dd2ec1842 100644 --- a/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml +++ b/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml @@ -196,6 +196,8 @@ Item { Layout.rightMargin: droppableTextArea.isEphemeral ? 20 : 15 Layout.leftMargin: droppableTextArea.isEphemeral ? 5 : 10 Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: fitWidth + Layout.preferredHeight: fitHeight visible: droppableTextArea.enabled isCustom: true backgroundRadius: 8 @@ -203,13 +205,14 @@ Item { onClicked: textArea.handleValidation() Icon{ - visible:droppableTextArea.isEphemeral + visible: sendButton.visible && droppableTextArea.isEphemeral icon: DroppableTextAreaStyle.ephemeralTimer.icon overwriteColor: DroppableTextAreaStyle.ephemeralTimer.timerColor iconSize: DroppableTextAreaStyle.ephemeralTimer.iconSize anchors.right:parent.right anchors.bottom : parent.bottom - anchors.rightMargin:-20 + anchors.bottomMargin:-5 + anchors.rightMargin:-17 } } } diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml index 5768e5988..c69cbc664 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml @@ -117,6 +117,7 @@ Item { anchors.right: parent.right anchors.topMargin: 3 anchors.leftMargin: 5 + interactive: false function updateWidth(){ var maxWidth = 0