mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2026-01-03 18:43:17 +08:00
settings: add rendez-vous option
Change-Id: Ifa2a4502d9eae2cd700de47ae0561d6728ba7a50
This commit is contained in:
@@ -150,7 +150,10 @@ CallAdapter::slotShowIncomingCallView(const QString &accountId, const conversati
|
||||
/*
|
||||
* Show incoming call page only.
|
||||
*/
|
||||
emit showIncomingCallPage(accountId, convInfo.uid);
|
||||
auto accountProperties = LRCInstance::accountModel().getAccountConfig(accountId);
|
||||
if (!accountProperties.autoAnswer && !accountProperties.isRendezVous) {
|
||||
emit showIncomingCallPage(accountId, convInfo.uid);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -165,11 +168,7 @@ CallAdapter::slotShowIncomingCallView(const QString &accountId, const conversati
|
||||
} else {
|
||||
auto selectedAccountId = LRCInstance::getCurrentAccountInfo().id;
|
||||
auto accountProperties = LRCInstance::accountModel().getAccountConfig(selectedAccountId);
|
||||
if (accountProperties.autoAnswer) {
|
||||
/*
|
||||
* TODO: Auto answer
|
||||
*/
|
||||
} else {
|
||||
if (!accountProperties.autoAnswer && !accountProperties.isRendezVous) {
|
||||
emit showIncomingCallPage(accountId, convInfo.uid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,6 +380,12 @@ SettingsAdaptor::getAccountConfig_DHT_PublicInCalls()
|
||||
return getAccountConfig().DHT.PublicInCalls;
|
||||
}
|
||||
|
||||
bool
|
||||
SettingsAdaptor::getAccountConfig_RendezVous()
|
||||
{
|
||||
return getAccountConfig().isRendezVous;
|
||||
}
|
||||
|
||||
bool
|
||||
SettingsAdaptor::getAccountConfig_AutoAnswer()
|
||||
{
|
||||
@@ -656,6 +662,15 @@ SettingsAdaptor::setCallsUntrusted(bool state)
|
||||
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsAdaptor::setIsRendezVous(bool state)
|
||||
{
|
||||
auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId());
|
||||
confProps.isRendezVous = state;
|
||||
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SettingsAdaptor::setAutoAnswerCalls(bool state)
|
||||
{
|
||||
|
||||
@@ -121,6 +121,7 @@ public:
|
||||
|
||||
Q_INVOKABLE bool getAccountConfig_PeerDiscovery();
|
||||
Q_INVOKABLE bool getAccountConfig_DHT_PublicInCalls();
|
||||
Q_INVOKABLE bool getAccountConfig_RendezVous();
|
||||
Q_INVOKABLE bool getAccountConfig_AutoAnswer();
|
||||
|
||||
Q_INVOKABLE QString getAccountConfig_RingNS_Uri();
|
||||
@@ -177,6 +178,7 @@ public:
|
||||
|
||||
Q_INVOKABLE void setAutoConnectOnLocalNetwork(bool state);
|
||||
Q_INVOKABLE void setCallsUntrusted(bool state);
|
||||
Q_INVOKABLE void setIsRendezVous(bool state);
|
||||
Q_INVOKABLE void setAutoAnswerCalls(bool state);
|
||||
Q_INVOKABLE void setEnableRingtone(bool state);
|
||||
Q_INVOKABLE void setEnableProxy(bool state);
|
||||
|
||||
@@ -34,6 +34,7 @@ ColumnLayout {
|
||||
//Call Settings
|
||||
checkAutoConnectOnLocalNetwork.checked = ClientWrapper.settingsAdaptor.getAccountConfig_PeerDiscovery()
|
||||
checkBoxUntrusted.checked = ClientWrapper.settingsAdaptor.getAccountConfig_DHT_PublicInCalls()
|
||||
checkBoxRdv.checked = ClientWrapper.settingsAdaptor.getAccountConfig_RendezVous()
|
||||
checkBoxAutoAnswer.checked = ClientWrapper.settingsAdaptor.getAccountConfig_AutoAnswer()
|
||||
checkBoxCustomRingtone.checked = ClientWrapper.settingsAdaptor.getAccountConfig_Ringtone_RingtoneEnabled()
|
||||
|
||||
@@ -380,6 +381,17 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ToggleSwitch {
|
||||
id: checkBoxRdv
|
||||
|
||||
labelText: qsTr("(Experimental) Rendez-vous: turn your account into a conference room")
|
||||
fontPointSize: 10
|
||||
|
||||
onSwitchToggled: {
|
||||
ClientWrapper.settingsAdaptor.setIsRendezVous(checked)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user