fix #LINQT-1658 hide meeting tab when empty videoconffactoryuri

This commit is contained in:
gaelle 2025-02-25 12:00:08 +01:00
parent e0e3838ccf
commit 311ad15a68
5 changed files with 34 additions and 17 deletions

View file

@ -714,6 +714,9 @@ void AccountCore::onAudioVideoConferenceFactoryAddressChanged(QString value) {
mAudioVideoConferenceFactoryAddress = value;
emit audioVideoConferenceFactoryAddressChanged();
}
if (mIsDefaultAccount) {
SettingsModel::getInstance()->setDisableMeetingsFeature(value.isEmpty());
}
}
void AccountCore::onLimeServerUrlChanged(QString value) {

View file

@ -62,6 +62,11 @@ SettingsModel::SettingsModel() {
notifyConfigReady();
}
});
QObject::connect(CoreModel::getInstance().get(), &CoreModel::defaultAccountChanged, this,
[this](const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::Account> account) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
setDisableMeetingsFeature(!account->getParams()->getAudioVideoConferenceFactoryAddress());
});
// Media cards must not be used twice (capture card + call) else we will get latencies issues and bad echo
// calibrations in call.
QObject::connect(CoreModel::getInstance().get(), &CoreModel::firstCallStarted, this,

View file

@ -4,6 +4,7 @@ import QtQuick.Controls.Basic as Control
import QtQuick.Effects
import Linphone
import SettingsCpp
Control.TabBar {
id: mainItem
@ -24,6 +25,16 @@ Control.TabBar {
if (defaultAccount) defaultAccount.core?.lRefreshNotifications()
}
Connections {
target: SettingsCpp
function onDisableMeetingsFeatureChanged() {
initButtons()
}
function onDisableChatFeatureChanged() {
initButtons()
}
}
component UnreadNotification: Rectangle {
id: unreadNotifications
property int unread: 0
@ -44,21 +55,21 @@ Control.TabBar {
}
}
contentItem: ListView {
model: mainItem.contentModel
currentIndex: mainItem.currentIndex
contentItem: ListView {
model: mainItem.contentModel
currentIndex: mainItem.currentIndex
spacing: mainItem.spacing
orientation: ListView.Vertical
// boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.AutoFlickIfNeeded
// snapMode: ListView.SnapToItem
spacing: mainItem.spacing
orientation: ListView.Vertical
// boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.AutoFlickIfNeeded
// snapMode: ListView.SnapToItem
// highlightMoveDuration: 0
// highlightRangeMode: ListView.ApplyRange
// preferredHighlightBegin: 40
// preferredHighlightEnd: width - 40
}
// highlightMoveDuration: 0
// highlightRangeMode: ListView.ApplyRange
// preferredHighlightBegin: 40
// preferredHighlightEnd: width - 40
}
background: Item {
id: background
@ -84,7 +95,7 @@ Control.TabBar {
}
}
Repeater {
Repeater {
id: actionsRepeater
Control.TabButton {
id: tabButton

View file

@ -184,7 +184,6 @@ Flickable {
}
onResultsProcessed: {
console.log("result processed list view")
mainItem.loading = false
mainItem.contentY = 0
}

View file

@ -138,8 +138,7 @@ AbstractSettingsLayout {
title: qsTr("URI de lusine à réunions")
propertyName: "audioVideoConferenceFactoryAddress"
propertyOwnerGui: account
visible: !SettingsCpp.disableMeetingsFeature
toValidate: true
toValidate: true
}
DecoratedTextField {
Layout.fillWidth: true