hide chat button if not supported for conference #LINQT-2192

This commit is contained in:
gaelle 2025-11-21 09:44:15 +01:00
parent 3f5797f453
commit afd3514965
6 changed files with 49 additions and 39 deletions

View file

@ -47,6 +47,7 @@ ConferenceCore::ConferenceCore(const std::shared_ptr<linphone::Conference> &conf
mIsLocalScreenSharing = mConferenceModel->isLocalScreenSharing();
mIsScreenSharingEnabled = mConferenceModel->isScreenSharingEnabled();
mIsRecording = conference->isRecording();
if (conference->getCurrentParams()) mIsChatEnabled = conference->getCurrentParams()->chatEnabled();
auto me = conference->getMe();
auto confAddress = conference->getConferenceAddress();
if (confAddress) {
@ -205,6 +206,10 @@ void ConferenceCore::setIsScreenSharingEnabled(bool state) {
}
}
bool ConferenceCore::isChatEnabled() const {
return mIsChatEnabled;
}
std::shared_ptr<ConferenceModel> ConferenceCore::getModel() const {
return mConferenceModel;
}

View file

@ -37,6 +37,7 @@ class ConferenceCore : public QObject, public AbstractObject {
Q_OBJECT
public:
Q_PROPERTY(QDateTime startDate READ getStartDate CONSTANT)
Q_PROPERTY(bool isChatEnabled READ isChatEnabled CONSTANT)
// Q_PROPERTY(ParticipantDeviceList *participantDevices READ getParticipantDeviceList CONSTANT)
// Q_PROPERTY(ParticipantModel* localParticipant READ getLocalParticipant NOTIFY localParticipantChanged)
Q_PROPERTY(bool isReady MEMBER mIsReady WRITE setIsReady NOTIFY isReadyChanged)
@ -81,6 +82,8 @@ public:
void setIsLocalScreenSharing(bool state);
void setIsScreenSharingEnabled(bool state);
bool isChatEnabled() const;
std::shared_ptr<ConferenceModel> getModel() const;
//---------------------------------------------------------------------------
@ -108,6 +111,7 @@ private:
bool mIsRecording = false;
bool mIsLocalScreenSharing = false;
bool mIsScreenSharingEnabled = false;
bool mIsChatEnabled = false;
QString mSubject;
QString mConfUri;
QDateTime mStartDate = QDateTime::currentDateTime();

View file

@ -1692,7 +1692,7 @@
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="702"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1644"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1645"/>
<source>call_action_show_dialer</source>
<extracomment>&quot;Pavé numérique&quot;</extracomment>
<translation>Wähltastatur</translation>
@ -1717,7 +1717,7 @@
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="717"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1725"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1726"/>
<source>call_action_go_to_settings</source>
<extracomment>&quot;Paramètres&quot;</extracomment>
<translation>Einstellungen</translation>
@ -1886,72 +1886,72 @@
<translation>Bildschirm teilen</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1505"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1506"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1507"/>
<source>call_open_chat_hint</source>
<extracomment>Open chat</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1528"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1529"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1530"/>
<source>call_rise_hand_hint</source>
<extracomment>&quot;Lever la main&quot;</extracomment>
<translation>Hand heben</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1542"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1543"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1544"/>
<source>call_send_reaction_hint</source>
<extracomment>&quot;Envoyer une réaction&quot;</extracomment>
<translation>Reaktion senden</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1554"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1555"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1556"/>
<source>call_manage_participants_hint</source>
<extracomment>&quot;Gérer les participants&quot;</extracomment>
<translation>Teilnehmer verwalten</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1576"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1577"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1578"/>
<source>call_more_options_hint</source>
<extracomment>&quot;Plus d&apos;options&quot;</extracomment>
<translation>Weitere Optionen</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1608"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1609"/>
<source>call_action_change_conference_layout</source>
<extracomment>&quot;Modifier la disposition&quot;</extracomment>
<translation>Layout ändern</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1622"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1623"/>
<source>call_action_full_screen</source>
<extracomment>&quot;Mode Plein écran&quot;</extracomment>
<translation>Vollbildmodus</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1675"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1676"/>
<source>call_action_stop_recording</source>
<extracomment>&quot;Terminer l&apos;enregistrement&quot;</extracomment>
<translation>Aufnahme beenden</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1677"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1678"/>
<source>call_action_record</source>
<extracomment>&quot;Enregistrer l&apos;appel&quot;</extracomment>
<translation>Anruf aufnehmen</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1705"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1706"/>
<source>call_activate_speaker_hint</source>
<extracomment>&quot;Activer le son&quot;</extracomment>
<translation type="unfinished">Lautsprecher aktivieren</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1707"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1708"/>
<source>call_deactivate_speaker_hint</source>
<extracomment>&quot;Désactiver le son&quot;</extracomment>
<translation type="unfinished">Lautsprecher stummschalten</translation>

View file

@ -1669,7 +1669,7 @@
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="702"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1644"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1645"/>
<source>call_action_show_dialer</source>
<extracomment>&quot;Pavé numérique&quot;</extracomment>
<translation>Dialer</translation>
@ -1694,7 +1694,7 @@
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="717"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1725"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1726"/>
<source>call_action_go_to_settings</source>
<extracomment>&quot;Paramètres&quot;</extracomment>
<translation>Settings</translation>
@ -1863,72 +1863,72 @@
<translation>Share screen</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1505"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1506"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1507"/>
<source>call_open_chat_hint</source>
<extracomment>Open chat</extracomment>
<translation>Open conversation</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1528"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1529"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1530"/>
<source>call_rise_hand_hint</source>
<extracomment>&quot;Lever la main&quot;</extracomment>
<translation>Rise hand</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1542"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1543"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1544"/>
<source>call_send_reaction_hint</source>
<extracomment>&quot;Envoyer une réaction&quot;</extracomment>
<translation>Send reaction</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1554"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1555"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1556"/>
<source>call_manage_participants_hint</source>
<extracomment>&quot;Gérer les participants&quot;</extracomment>
<translation>Manage participants</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1576"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1577"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1578"/>
<source>call_more_options_hint</source>
<extracomment>&quot;Plus d&apos;options&quot;</extracomment>
<translation>More options</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1608"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1609"/>
<source>call_action_change_conference_layout</source>
<extracomment>&quot;Modifier la disposition&quot;</extracomment>
<translation>Change layout</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1622"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1623"/>
<source>call_action_full_screen</source>
<extracomment>&quot;Mode Plein écran&quot;</extracomment>
<translation>Full screen mode</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1675"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1676"/>
<source>call_action_stop_recording</source>
<extracomment>&quot;Terminer l&apos;enregistrement&quot;</extracomment>
<translation>End recording</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1677"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1678"/>
<source>call_action_record</source>
<extracomment>&quot;Enregistrer l&apos;appel&quot;</extracomment>
<translation>Record call</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1705"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1706"/>
<source>call_activate_speaker_hint</source>
<extracomment>&quot;Activer le son&quot;</extracomment>
<translation>Activate speaker</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1707"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1708"/>
<source>call_deactivate_speaker_hint</source>
<extracomment>&quot;Désactiver le son&quot;</extracomment>
<translation>Mute speaker</translation>

View file

@ -1669,7 +1669,7 @@
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="702"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1644"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1645"/>
<source>call_action_show_dialer</source>
<extracomment>&quot;Pavé numérique&quot;</extracomment>
<translation>Pavé numérique</translation>
@ -1694,7 +1694,7 @@
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="717"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1725"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1726"/>
<source>call_action_go_to_settings</source>
<extracomment>&quot;Paramètres&quot;</extracomment>
<translation>Paramètres</translation>
@ -1863,72 +1863,72 @@
<translation>Partager l&apos;écran</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1505"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1506"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1507"/>
<source>call_open_chat_hint</source>
<extracomment>Open chat</extracomment>
<translation>Ouvrir le chat</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1528"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1529"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1530"/>
<source>call_rise_hand_hint</source>
<extracomment>&quot;Lever la main&quot;</extracomment>
<translation>Lever la main</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1542"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1543"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1544"/>
<source>call_send_reaction_hint</source>
<extracomment>&quot;Envoyer une réaction&quot;</extracomment>
<translation>Envoyer une réaction</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1554"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1555"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1556"/>
<source>call_manage_participants_hint</source>
<extracomment>&quot;Gérer les participants&quot;</extracomment>
<translation>Gérer les participants</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1576"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1577"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1578"/>
<source>call_more_options_hint</source>
<extracomment>&quot;Plus d&apos;options&quot;</extracomment>
<translation>Plus d&apos;options</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1608"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1609"/>
<source>call_action_change_conference_layout</source>
<extracomment>&quot;Modifier la disposition&quot;</extracomment>
<translation>Modifier la disposition</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1622"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1623"/>
<source>call_action_full_screen</source>
<extracomment>&quot;Mode Plein écran&quot;</extracomment>
<translation>Mode Plein écran</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1675"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1676"/>
<source>call_action_stop_recording</source>
<extracomment>&quot;Terminer l&apos;enregistrement&quot;</extracomment>
<translation>Terminer l&apos;enregistrement</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1677"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1678"/>
<source>call_action_record</source>
<extracomment>&quot;Enregistrer l&apos;appel&quot;</extracomment>
<translation>Enregistrer l&apos;appel</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1705"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1706"/>
<source>call_activate_speaker_hint</source>
<extracomment>&quot;Activer le son&quot;</extracomment>
<translation>Activer le son</translation>
</message>
<message>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1707"/>
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1708"/>
<source>call_deactivate_speaker_hint</source>
<extracomment>&quot;Désactiver le son&quot;</extracomment>
<translation>Désactiver le son</translation>

View file

@ -1500,6 +1500,7 @@ AbstractWindow {
// Chat panel button
CheckableButton {
id: chatPanelButton
visible: !mainWindow.conference || mainWindow.conference.core.isChatEnabled
iconUrl: AppIcons.chatTeardropText
//: Open chat
ToolTip.text: qsTr("call_open_chat_hint")