From d4be006a8c40bdbc43d450f20f1f6754470583f1 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 29 Jun 2022 12:43:14 +0200 Subject: [PATCH] Remove invitation filter in conference list. Fix participants size in ICS when expanded. --- linphone-app/assets/languages/da.ts | 5 -- linphone-app/assets/languages/de.ts | 5 -- linphone-app/assets/languages/en.ts | 5 -- linphone-app/assets/languages/es.ts | 5 -- linphone-app/assets/languages/fr_FR.ts | 5 -- linphone-app/assets/languages/hu.ts | 5 -- linphone-app/assets/languages/it.ts | 5 -- linphone-app/assets/languages/ja.ts | 5 -- linphone-app/assets/languages/lt.ts | 5 -- linphone-app/assets/languages/pt_BR.ts | 5 -- linphone-app/assets/languages/ru.ts | 5 -- linphone-app/assets/languages/sv.ts | 5 -- linphone-app/assets/languages/tr.ts | 5 -- linphone-app/assets/languages/uk.ts | 5 -- linphone-app/assets/languages/zh_CN.ts | 5 -- .../Linphone/Chat/ChatCalendarMessage.qml | 65 ++++++++++--------- .../ui/views/App/Main/Conferences.qml | 7 +- 17 files changed, 38 insertions(+), 109 deletions(-) diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index ffdb9d136..9ff026fe2 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -812,11 +812,6 @@ Server url ikke konfigureret. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index f9fdf9048..94c69e0ad 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -812,11 +812,6 @@ Server URL ist nicht konfiguriert. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index b32d8de6e..9c29f4267 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -812,11 +812,6 @@ Server URL not configured. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. Conference URL has been copied - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - Invitations - ConfirmDialog diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 15ca47368..641b4e808 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -812,11 +812,6 @@ URL del servidor no configurada. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index 4d70dc7e3..d0db7839c 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -812,11 +812,6 @@ URL du serveur non configurée. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 632b3b738..9e284bfc0 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -806,11 +806,6 @@ A kiszolgáló URL-je nincs konfigurálva. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 45f5535a5..c645394aa 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -812,11 +812,6 @@ URL del server non configurato. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. L'URL della conferenze è stato copiato - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 844ef72e7..cc9d65a44 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -806,11 +806,6 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index 205021258..7d0f96230 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -818,11 +818,6 @@ Nesukonfigūruotas serverio url. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index 38642024b..df9d627bc 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -812,11 +812,6 @@ URL do servidor não configurado. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index f66c0c24a..82d4c8abe 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -818,11 +818,6 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. URL конференции скопирован - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index d5a8bcd56..3c34f2e25 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -812,11 +812,6 @@ Serverwebbadressen är inte konfigurerad. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index fb8d5df67..18dc969d0 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -806,11 +806,6 @@ Sunucu url'si yapılandırılmadı. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 70233ff69..b522e7e9f 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -818,11 +818,6 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index 2cca117c0..c850e3d03 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -806,11 +806,6 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. - - conferencesInvitedFilter - 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - - ConfirmDialog diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml index cc4159ee0..8ad5ea5ae 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml @@ -122,13 +122,15 @@ Loader{ RowLayout { id: participantsRow Layout.fillWidth: true - Layout.preferredHeight: ChatCalendarMessageStyle.participants.iconSize + Layout.fillHeight: true + Layout.minimumHeight: mainItem.isExpanded ? expandedParticipantsList.minimumHeight : ChatCalendarMessageStyle.participants.iconSize Layout.leftMargin: 5 Layout.rightMargin: 15 spacing: ChatCalendarMessageStyle.participants.spacing Icon{ + Layout.alignment: Qt.AlignTop icon: ChatCalendarMessageStyle.participants.icon iconSize: ChatCalendarMessageStyle.participants.iconSize overwriteColor: ChatCalendarMessageStyle.participants.color @@ -137,13 +139,44 @@ Loader{ Text { id: participantsList Layout.fillWidth: true + visible: !mainItem.isExpanded color: ChatCalendarMessageStyle.participants.color elide: Text.ElideRight font.pointSize: ChatCalendarMessageStyle.participants.pointSize text: mainItem.conferenceInfoModel.displayNamesToString - } + } + ScrollableListView{ + id: expandedParticipantsList + property int minimumHeight: Math.min( count * ChatCalendarMessageStyle.lineHeight, layout.height/(descriptionTitle.visible?3:2)) + Layout.fillWidth: true + Layout.minimumHeight: minimumHeight + spacing: 0 + visible: mainItem.isExpanded + onVisibleChanged: model= mainItem.conferenceInfoModel.getParticipants() + + delegate: Row{ + spacing: 5 + width: expandedParticipantsList.contentWidth + height: ChatCalendarMessageStyle.lineHeight + Text{ + id: displayName + text: modelData.displayName + color: ChatCalendarMessageStyle.description.color + font.pointSize: ChatCalendarMessageStyle.description.pointSize + elide: Text.ElideRight + } + Text{ + width: expandedParticipantsList.contentWidth - displayName.width - parent.spacing // parent.width is not enough. Force width + text: '('+modelData.address+')' + color: ChatCalendarMessageStyle.description.color + font.pointSize: ChatCalendarMessageStyle.description.pointSize + elide: Text.ElideRight + } + } + } ActionButton{ visible: mainItem.gotoButtonMode >= 0 + Layout.alignment: Qt.AlignTop Layout.preferredHeight: iconSize Layout.preferredWidth: height isCustom: true @@ -160,33 +193,7 @@ Loader{ Layout.topMargin: 5 visible: mainItem.isExpanded spacing: 0 - ScrollableListView{ - id: expandedParticipantsList - Layout.fillWidth: true - Layout.minimumHeight: Math.min( count * ChatCalendarMessageStyle.lineHeight, parent.height/(descriptionTitle.visible?3:2)) - Layout.leftMargin: 10 - spacing: 0 - visible: mainItem.isExpanded - onVisibleChanged: model= mainItem.conferenceInfoModel.getParticipants() - - delegate: Row{ - spacing: 5 - width: expandedParticipantsList.width - height: ChatCalendarMessageStyle.lineHeight - Text{text: modelData.displayName - color: ChatCalendarMessageStyle.description.color - font.pointSize: ChatCalendarMessageStyle.description.pointSize - elide: Text.ElideRight - wrapMode: TextEdit.WordWrap - } - Text{text: '('+modelData.address+')' - color: ChatCalendarMessageStyle.description.color - font.pointSize: ChatCalendarMessageStyle.description.pointSize - elide: Text.ElideRight - wrapMode: TextEdit.WordWrap - } - } - } + Text{ id: descriptionTitle Layout.fillWidth: true diff --git a/linphone-app/ui/views/App/Main/Conferences.qml b/linphone-app/ui/views/App/Main/Conferences.qml index 5112cb2f5..6cbceab3f 100644 --- a/linphone-app/ui/views/App/Main/Conferences.qml +++ b/linphone-app/ui/views/App/Main/Conferences.qml @@ -63,15 +63,12 @@ Item{ //: 'Scheduled' : Filter conferences on scheduled status. qsTr('conferencesScheduledFilter'), - - //: 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - qsTr('conferencesInvitedFilter'), ] capitalization: Font.AllUppercase selectedButton: mainItem.filterType onClicked: { - if(button <= 2) - mainItem.filterType = (button === 0 ? ConferenceInfoProxyModel.Ended : button === 1 ?ConferenceInfoProxyModel.Scheduled : ConferenceInfoProxyModel.Invitations); + if(button <= 1) + mainItem.filterType = (button === 0 ? ConferenceInfoProxyModel.Ended : ConferenceInfoProxyModel.Scheduled); } } }