From a80f4c1a6e98c6085a5b04d8cf04c2f3213b8c83 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Thu, 31 Oct 2024 09:57:43 +0100 Subject: [PATCH] Fix empty lists ui ui fixes fix crash participantCore fix account name on init fix #LINQT-1366 fix #LINQT-1380 try to fix #LINQT-1379 (new call : crash when ending the call before remote answers) --- Linphone/view/Page/Main/Call/CallPage.qml | 19 ++++++++------ .../view/Page/Main/Contact/ContactPage.qml | 10 ++++---- .../view/Page/Main/Meeting/MeetingPage.qml | 25 +++++++++++-------- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index fef08f4b..cfbe4421 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -9,7 +9,7 @@ import SettingsCpp AbstractMainPage { id: mainItem noItemButtonText: qsTr("Nouvel appel") - emptyListText: qsTr("Aucun appel") + emptyListText: qsTr("Historique d'appel vide") newItemIconSource: AppIcons.newCall property var selectedRowHistoryGui @@ -208,10 +208,17 @@ AbstractMainPage { Layout.fillWidth: true Layout.rightMargin: 39 * DefaultStyle.dp placeholderText: qsTr("Rechercher un appel") - visible: historyListView.count !== 0 + visible: historyListView.count !== 0 || text.length !== 0 focus: true KeyNavigation.up: titleLoader KeyNavigation.down: historyListView + Binding { + target: mainItem + property: "showDefaultItem" + when: searchBar.text.length != 0 + value: false + restoreMode: Binding.RestoreBindingOrValue + } } Item { Layout.topMargin: 38 * DefaultStyle.dp @@ -225,17 +232,13 @@ AbstractMainPage { background: Item{} contentItem: ColumnLayout { Text { - visible: historyListView.count === 0 + visible: historyListView.count === 0 || searchBar.text.length != 0 Layout.alignment: Qt.AlignHCenter - text: qsTr("Aucun appel") + text: qsTr("Aucun appel%1").arg(searchBar.text.length != 0 ? " correspondant" : "") font { pixelSize: 16 * DefaultStyle.dp weight: 800 * DefaultStyle.dp } - Binding on text { - when: searchBar.text.length !== 0 - value: qsTr("Aucun appel correspondant") - } } ListView { id: historyListView diff --git a/Linphone/view/Page/Main/Contact/ContactPage.qml b/Linphone/view/Page/Main/Contact/ContactPage.qml index 22128217..febccf83 100644 --- a/Linphone/view/Page/Main/Contact/ContactPage.qml +++ b/Linphone/view/Page/Main/Contact/ContactPage.qml @@ -52,7 +52,7 @@ AbstractMainPage { // rightPanelStackView.initialItem: contactDetail - showDefaultItem: rightPanelStackView.depth == 0 && contactList.count == 0 + showDefaultItem: rightPanelStackView.depth == 0 && contactList.count === 0 && searchBar.text.length === 0 MagicSearchProxy { id: allFriends @@ -211,7 +211,7 @@ AbstractMainPage { spacing: 38 * DefaultStyle.dp SearchBar { id: searchBar - visible: contactList.count != 0 + visible: contactList.count != 0 || text.length !== 0 Layout.leftMargin: leftPanel.leftMargin Layout.rightMargin: leftPanel.rightMargin Layout.topMargin: 18 * DefaultStyle.dp @@ -236,10 +236,10 @@ AbstractMainPage { width: parent.width spacing: 15 * DefaultStyle.dp Text { - visible: contactList.count === 0 && favoriteList.count === 0 + visible: contactList.count === 0 || searchBar.text.length != 0 Layout.alignment: Qt.AlignHCenter Layout.topMargin: 137 * DefaultStyle.dp - text: qsTr("Aucun contact") + text: qsTr("Aucun contact%1").arg(searchBar.text.length !== 0 ? " correspondant" : "") font { pixelSize: 16 * DefaultStyle.dp weight: 800 * DefaultStyle.dp @@ -920,4 +920,4 @@ AbstractMainPage { } } } -} +} \ No newline at end of file diff --git a/Linphone/view/Page/Main/Meeting/MeetingPage.qml b/Linphone/view/Page/Main/Meeting/MeetingPage.qml index 006ba6af..fe7309d5 100644 --- a/Linphone/view/Page/Main/Meeting/MeetingPage.qml +++ b/Linphone/view/Page/Main/Meeting/MeetingPage.qml @@ -128,6 +128,7 @@ AbstractMainPage { Control.StackView.onActivated: { mainItem.selectedConference = conferenceList.selectedConference } + ColumnLayout { id: listLayoutIn anchors.fill: parent @@ -163,25 +164,27 @@ AbstractMainPage { Layout.topMargin: 18 * DefaultStyle.dp Layout.rightMargin: 38 * DefaultStyle.dp placeholderText: qsTr("Rechercher une réunion") - visible: conferenceList.count !== 0 + visible: conferenceList.count !== 0 || text.length !== 0 KeyNavigation.up: conferenceList KeyNavigation.down: conferenceList + Binding { + target: mainItem + property: "showDefaultItem" + when: searchBar.text.length !== 0 + value: false + restoreMode: Binding.RestoreBindingOrValue + } } Text { - Layout.topMargin: 137 * DefaultStyle.dp + visible: conferenceList.count === 0 || searchBar.text.length != 0 + Layout.topMargin: 137 * DefaultStyle.dp Layout.fillHeight: true Layout.alignment: Qt.AlignHCenter - text: mainItem.emptyListText + text: qsTr("Aucune réunion%1").arg(searchBar.text.length !== 0 ? " correspondante" : "") font { pixelSize: 16 * DefaultStyle.dp weight: 800 * DefaultStyle.dp } - visible: mainItem.showDefaultItem - Binding on text { - when: searchBar.text.length !== 0 - value: qsTr("Aucune réunion correspondante") - restoreMode: Binding.RestoreBindingOrValue - } } MeetingListView { id: conferenceList @@ -189,6 +192,7 @@ AbstractMainPage { Layout.topMargin: 38 * DefaultStyle.dp - 24 * DefaultStyle.dp Layout.fillWidth: true Layout.fillHeight: true + implicitHeight: contentHeight hoverEnabled: mainItem.leftPanelEnabled highlightFollowsCurrentItem: true preferredHighlightBegin: height/2 - 10 @@ -218,6 +222,7 @@ AbstractMainPage { } } + Item{Layout.fillHeight: true} } } } @@ -339,7 +344,7 @@ AbstractMainPage { id: editFocusScope property bool isCreation property ConferenceInfoGui conferenceInfoGui - width : parent.width + width: parent.width height: editLayout.implicitHeight ColumnLayout { id: editLayout