diff --git a/Telegram/SourceFiles/core/core_settings.cpp b/Telegram/SourceFiles/core/core_settings.cpp index 83ceb0803..64aeb2a3f 100644 --- a/Telegram/SourceFiles/core/core_settings.cpp +++ b/Telegram/SourceFiles/core/core_settings.cpp @@ -112,8 +112,7 @@ QByteArray Settings::serialize() const { + sizeof(qint64) + sizeof(qint32) * 2 + Serialize::bytearraySize(windowPosition) - + sizeof(qint32) - + Serialize::bytearraySize(_photoEditorBrush); + + sizeof(qint32); for (const auto &[id, rating] : recentEmojiPreloadData) { size += Serialize::stringSize(id) + sizeof(quint16); } @@ -123,7 +122,9 @@ QByteArray Settings::serialize() const { } size += sizeof(qint32) * 3 + Serialize::bytearraySize(proxy) - + sizeof(qint32) * 2; + + sizeof(qint32) * 2 + + Serialize::bytearraySize(_photoEditorBrush) + + sizeof(qint32); auto result = QByteArray(); result.reserve(size); @@ -212,12 +213,13 @@ QByteArray Settings::serialize() const { } stream << qint32(0) // Old Disable OpenGL - << qint32(_groupCallNoiseSuppression ? 1 : 0) + << qint32(0) // Old Noise Suppression << qint32(_workMode.current()) << proxy << qint32(_hiddenGroupCallTooltips.value()) << qint32(_disableOpenGL ? 1 : 0) - << _photoEditorBrush; + << _photoEditorBrush + << qint32(_groupCallNoiseSuppression ? 1 : 0); } return result; } @@ -432,7 +434,8 @@ void Settings::addFromSerialized(const QByteArray &serialized) { stream >> disableOpenGLOld; } if (!stream.atEnd()) { - stream >> groupCallNoiseSuppression; + qint32 groupCallNoiseSuppressionOld; + stream >> groupCallNoiseSuppressionOld; } if (!stream.atEnd()) { stream >> workMode; @@ -449,6 +452,9 @@ void Settings::addFromSerialized(const QByteArray &serialized) { if (!stream.atEnd()) { stream >> photoEditorBrush; } + if (!stream.atEnd()) { + stream >> groupCallNoiseSuppression; + } if (stream.status() != QDataStream::Ok) { LOG(("App Error: " "Bad data for Core::Settings::constructFromSerialized()")); @@ -802,7 +808,7 @@ void Settings::resetOnLastLogout() { _groupCallPushToTalkShortcut = QByteArray(); _groupCallPushToTalkDelay = 20; - _groupCallNoiseSuppression = true; + _groupCallNoiseSuppression = false; //_themesAccentColors = Window::Theme::AccentColors(); diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h index 63c803c6a..7eac1ff23 100644 --- a/Telegram/SourceFiles/core/core_settings.h +++ b/Telegram/SourceFiles/core/core_settings.h @@ -653,7 +653,7 @@ private: bool _callAudioDuckingEnabled = true; bool _disableCalls = false; bool _groupCallPushToTalk = false; - bool _groupCallNoiseSuppression = true; + bool _groupCallNoiseSuppression = false; QByteArray _groupCallPushToTalkShortcut; crl::time _groupCallPushToTalkDelay = 20; Window::Theme::AccentColors _themesAccentColors;