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;
|
mAudioVideoConferenceFactoryAddress = value;
|
||||||
emit audioVideoConferenceFactoryAddressChanged();
|
emit audioVideoConferenceFactoryAddressChanged();
|
||||||
}
|
}
|
||||||
|
if (mIsDefaultAccount) {
|
||||||
|
SettingsModel::getInstance()->setDisableMeetingsFeature(value.isEmpty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountCore::onLimeServerUrlChanged(QString value) {
|
void AccountCore::onLimeServerUrlChanged(QString value) {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,11 @@ SettingsModel::SettingsModel() {
|
||||||
notifyConfigReady();
|
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
|
// Media cards must not be used twice (capture card + call) else we will get latencies issues and bad echo
|
||||||
// calibrations in call.
|
// calibrations in call.
|
||||||
QObject::connect(CoreModel::getInstance().get(), &CoreModel::firstCallStarted, this,
|
QObject::connect(CoreModel::getInstance().get(), &CoreModel::firstCallStarted, this,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import QtQuick.Controls.Basic as Control
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
|
||||||
import Linphone
|
import Linphone
|
||||||
|
import SettingsCpp
|
||||||
|
|
||||||
Control.TabBar {
|
Control.TabBar {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
|
@ -24,6 +25,16 @@ Control.TabBar {
|
||||||
if (defaultAccount) defaultAccount.core?.lRefreshNotifications()
|
if (defaultAccount) defaultAccount.core?.lRefreshNotifications()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: SettingsCpp
|
||||||
|
function onDisableMeetingsFeatureChanged() {
|
||||||
|
initButtons()
|
||||||
|
}
|
||||||
|
function onDisableChatFeatureChanged() {
|
||||||
|
initButtons()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
component UnreadNotification: Rectangle {
|
component UnreadNotification: Rectangle {
|
||||||
id: unreadNotifications
|
id: unreadNotifications
|
||||||
property int unread: 0
|
property int unread: 0
|
||||||
|
|
@ -44,21 +55,21 @@ Control.TabBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
model: mainItem.contentModel
|
model: mainItem.contentModel
|
||||||
currentIndex: mainItem.currentIndex
|
currentIndex: mainItem.currentIndex
|
||||||
|
|
||||||
spacing: mainItem.spacing
|
spacing: mainItem.spacing
|
||||||
orientation: ListView.Vertical
|
orientation: ListView.Vertical
|
||||||
// boundsBehavior: Flickable.StopAtBounds
|
// boundsBehavior: Flickable.StopAtBounds
|
||||||
flickableDirection: Flickable.AutoFlickIfNeeded
|
flickableDirection: Flickable.AutoFlickIfNeeded
|
||||||
// snapMode: ListView.SnapToItem
|
// snapMode: ListView.SnapToItem
|
||||||
|
|
||||||
// highlightMoveDuration: 0
|
// highlightMoveDuration: 0
|
||||||
// highlightRangeMode: ListView.ApplyRange
|
// highlightRangeMode: ListView.ApplyRange
|
||||||
// preferredHighlightBegin: 40
|
// preferredHighlightBegin: 40
|
||||||
// preferredHighlightEnd: width - 40
|
// preferredHighlightEnd: width - 40
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
id: background
|
id: background
|
||||||
|
|
@ -84,7 +95,7 @@ Control.TabBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: actionsRepeater
|
id: actionsRepeater
|
||||||
Control.TabButton {
|
Control.TabButton {
|
||||||
id: tabButton
|
id: tabButton
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,6 @@ Flickable {
|
||||||
|
|
||||||
}
|
}
|
||||||
onResultsProcessed: {
|
onResultsProcessed: {
|
||||||
console.log("result processed list view")
|
|
||||||
mainItem.loading = false
|
mainItem.loading = false
|
||||||
mainItem.contentY = 0
|
mainItem.contentY = 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,7 @@ AbstractSettingsLayout {
|
||||||
title: qsTr("URI de l’usine à réunions")
|
title: qsTr("URI de l’usine à réunions")
|
||||||
propertyName: "audioVideoConferenceFactoryAddress"
|
propertyName: "audioVideoConferenceFactoryAddress"
|
||||||
propertyOwnerGui: account
|
propertyOwnerGui: account
|
||||||
visible: !SettingsCpp.disableMeetingsFeature
|
toValidate: true
|
||||||
toValidate: true
|
|
||||||
}
|
}
|
||||||
DecoratedTextField {
|
DecoratedTextField {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue