fix #LINQT-1658 hide meeting tab when empty videoconffactoryuri
This commit is contained in:
parent
e0e3838ccf
commit
311ad15a68
5 changed files with 34 additions and 17 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -184,7 +184,6 @@ Flickable {
|
|||
|
||||
}
|
||||
onResultsProcessed: {
|
||||
console.log("result processed list view")
|
||||
mainItem.loading = false
|
||||
mainItem.contentY = 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,8 +138,7 @@ AbstractSettingsLayout {
|
|||
title: qsTr("URI de l’usine à réunions")
|
||||
propertyName: "audioVideoConferenceFactoryAddress"
|
||||
propertyOwnerGui: account
|
||||
visible: !SettingsCpp.disableMeetingsFeature
|
||||
toValidate: true
|
||||
toValidate: true
|
||||
}
|
||||
DecoratedTextField {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue