Fix multi-addresses on search bar

Fix hidding send button in chat
This commit is contained in:
Julien Wadel 2022-03-18 19:08:50 +01:00
parent 49eb29fe98
commit 872df224e7
5 changed files with 17 additions and 10 deletions

View file

@ -29,10 +29,10 @@
SearchResultModel::SearchResultModel(std::shared_ptr<const linphone::Friend> linphoneFriend, std::shared_ptr<const linphone::Address> 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{

View file

@ -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);
}
}
// -----------------------------------------------------------------------------

View file

@ -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

View file

@ -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
}
}
}

View file

@ -117,6 +117,7 @@ Item {
anchors.right: parent.right
anchors.topMargin: 3
anchors.leftMargin: 5
interactive: false
function updateWidth(){
var maxWidth = 0