diff --git a/daemon b/daemon index 80142ae63d4639f38f3ab491bde47e886d9c0ea8..fab9009a1c3b95430723ab3ddd93037943195ec9 160000 --- a/daemon +++ b/daemon @@ -1 +1 @@ -Subproject commit 80142ae63d4639f38f3ab491bde47e886d9c0ea8 +Subproject commit fab9009a1c3b95430723ab3ddd93037943195ec9 diff --git a/src/app/appsettingsmanager.h b/src/app/appsettingsmanager.h index 011617579b6d35ed6f3be7be21594f0abe580adf..bbdfa5cd828ca1a8f8da2fed1ecccc45f3e862cb 100644 --- a/src/app/appsettingsmanager.h +++ b/src/app/appsettingsmanager.h @@ -47,7 +47,6 @@ extern const QString defaultDownloadPath; X(DownloadPath, defaultDownloadPath) \ X(ScreenshotPath, {}) \ X(EnableNotifications, true) \ - X(EnableTypingIndicator, true) \ X(EnableReadReceipt, true) \ X(AcceptTransferBelow, 20) \ X(AutoAcceptFiles, true) \ diff --git a/src/app/currentaccount.cpp b/src/app/currentaccount.cpp index 45e8a77cf22d74437493012d5b1eb81c3ce8a156..0c74309eac1b09ed9e7ca23c1104ba69651db703 100644 --- a/src/app/currentaccount.cpp +++ b/src/app/currentaccount.cpp @@ -144,6 +144,7 @@ CurrentAccount::updateData() set_deviceId(accConfig.deviceId); set_peerDiscovery(accConfig.peerDiscovery, true); set_sendReadReceipt(accConfig.sendReadReceipt, true); + set_sendComposing(accConfig.sendComposing, true); set_isRendezVous(accConfig.isRendezVous, true); set_dhtPort(accConfig.dhtPort, true); set_autoAnswer(accConfig.autoAnswer, true); diff --git a/src/app/currentaccount.h b/src/app/currentaccount.h index 32ffdfb84abc6efea469d872603aa72af4b641e1..0d31cac0db7c547717ef43baa76ff0699cbc8f20 100644 --- a/src/app/currentaccount.h +++ b/src/app/currentaccount.h @@ -119,6 +119,7 @@ class CurrentAccount final : public QObject QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(int, dhtPort) QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, peerDiscovery) QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, sendReadReceipt) + QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, sendComposing) QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, isRendezVous) QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, autoAnswer) QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, proxyEnabled) diff --git a/src/app/messagesadapter.cpp b/src/app/messagesadapter.cpp index 066e35fa7f6cb33de50a7cc1b7282e2e7fd7047a..a735c02c5ed0ba9fee2e8ed3ab2cf7c3baae0453 100644 --- a/src/app/messagesadapter.cpp +++ b/src/app/messagesadapter.cpp @@ -391,10 +391,8 @@ MessagesAdapter::dataForInteraction(const QString& interactionId, int role) cons void MessagesAdapter::userIsComposing(bool isComposing) { - if (!settingsManager_->getValue(Settings::Key::EnableTypingIndicator).toBool() - || lrcInstance_->get_selectedConvUid().isEmpty()) { + if (lrcInstance_->get_selectedConvUid().isEmpty()) return; - } lrcInstance_->getCurrentConversationModel()->setIsComposing(lrcInstance_->get_selectedConvUid(), isComposing); } diff --git a/src/app/settingsview/components/AdvancedChatSettings.qml b/src/app/settingsview/components/AdvancedChatSettings.qml index 7dfa403b5599b9bccbbd03687bc731a33dbd3051..367c8c971a0b66a3c2660430eace6684b30e253b 100644 --- a/src/app/settingsview/components/AdvancedChatSettings.qml +++ b/src/app/settingsview/components/AdvancedChatSettings.qml @@ -53,4 +53,17 @@ ColumnLayout { onSwitchToggled: CurrentAccount.sendReadReceipt = checked } + + ToggleSwitch { + id: enableTypingIndicatorCheckbox + + Layout.fillWidth: true + + checked: CurrentAccount.sendComposing + labelText: JamiStrings.enableTypingIndicator + descText: JamiStrings.enableTypingIndicatorDescription + tooltipText: JamiStrings.enableTypingIndicator + + onSwitchToggled: CurrentAccount.sendComposing = checked + } } diff --git a/src/app/settingsview/components/ChatSettingsPage.qml b/src/app/settingsview/components/ChatSettingsPage.qml index 08a53252f197db36f603f96b35e3fa814e6fd3de..7b46e1a5e26c1d04b9f14ee1c962d7564a2c6c62 100644 --- a/src/app/settingsview/components/ChatSettingsPage.qml +++ b/src/app/settingsview/components/ChatSettingsPage.qml @@ -65,19 +65,6 @@ SettingsPageBase { font.kerning: true } - ToggleSwitch { - id: enableTypingIndicatorCheckbox - - Layout.fillWidth: true - - checked: UtilsAdapter.getAppValue(Settings.EnableTypingIndicator) - labelText: JamiStrings.enableTypingIndicator - descText: JamiStrings.enableTypingIndicatorDescription - tooltipText: JamiStrings.enableTypingIndicator - - onSwitchToggled: UtilsAdapter.setAppValue(Settings.Key.EnableTypingIndicator, checked) - } - ToggleSwitch { id: displayImagesCheckbox visible: WITH_WEBENGINE @@ -258,10 +245,8 @@ SettingsPageBase { acceptTransferBelowSpinBox.valueField = UtilsAdapter.getDefault(Settings.Key.AcceptTransferBelow); UtilsAdapter.setToDefault(Settings.Key.AutoAcceptFiles); UtilsAdapter.setToDefault(Settings.Key.AcceptTransferBelow); - UtilsAdapter.setToDefault(Settings.Key.EnableTypingIndicator); UtilsAdapter.setToDefault(Settings.Key.ChatViewEnterIsNewLine); UtilsAdapter.setToDefault(Settings.Key.DisplayHyperlinkPreviews); - enableTypingIndicatorCheckbox.checked = UtilsAdapter.getAppValue(Settings.EnableTypingIndicator); displayImagesCheckbox.checked = UtilsAdapter.getAppValue(Settings.DisplayHyperlinkPreviews); if (UtilsAdapter.getAppValue(Settings.Key.ChatViewEnterIsNewLine)) enterButton.checked = true; diff --git a/src/libclient/accountmodel.cpp b/src/libclient/accountmodel.cpp index fc516ad2c20922d20b2ee9e3a704c159399f2b09..d81951c3af89cdd681bc9c97af087dfd9aff8e65 100644 --- a/src/libclient/accountmodel.cpp +++ b/src/libclient/accountmodel.cpp @@ -819,6 +819,7 @@ account::Info::fromDetails(const MapStringString& details) confProperties.dtmfType = details[ConfProperties::DTMF_TYPE]; confProperties.autoAnswer = toBool(details[ConfProperties::AUTOANSWER]); confProperties.sendReadReceipt = toBool(details[ConfProperties::SENDREADRECEIPT]); + confProperties.sendComposing = toBool(details[ConfProperties::SENDCOMPOSING]); confProperties.isRendezVous = toBool(details[ConfProperties::ISRENDEZVOUS]); confProperties.activeCallLimit = toInt(details[ConfProperties::ACTIVE_CALL_LIMIT]); confProperties.hostname = details[ConfProperties::HOSTNAME]; @@ -934,6 +935,7 @@ account::ConfProperties_t::toDetails() const details[ConfProperties::DTMF_TYPE] = this->dtmfType; details[ConfProperties::AUTOANSWER] = toQString(this->autoAnswer); details[ConfProperties::SENDREADRECEIPT] = toQString(this->sendReadReceipt); + details[ConfProperties::SENDCOMPOSING] = toQString(this->sendComposing); details[ConfProperties::ISRENDEZVOUS] = toQString(this->isRendezVous); details[ConfProperties::ACTIVE_CALL_LIMIT] = toQString(this->activeCallLimit); details[ConfProperties::HOSTNAME] = this->hostname; diff --git a/src/libclient/api/account.h b/src/libclient/api/account.h index 9e867da7a5b6b9ba64b72b810b4bb4c4c231a4d0..4779f51523e59a28d6cf0f88d0cdd4a5831f956b 100644 --- a/src/libclient/api/account.h +++ b/src/libclient/api/account.h @@ -81,6 +81,7 @@ struct ConfProperties_t QString dtmfType; bool autoAnswer; bool sendReadReceipt; + bool sendComposing; bool isRendezVous; int activeCallLimit; QString hostname;