mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
parent
8447b95c50
commit
d568cab2fc
2 changed files with 12 additions and 5 deletions
|
@ -240,7 +240,7 @@ QByteArray Settings::serialize() const {
|
|||
+ Serialize::stringSize(_customFontFamily)
|
||||
+ sizeof(qint32) * 3
|
||||
+ Serialize::bytearraySize(_tonsiteStorageToken)
|
||||
+ sizeof(qint32) * 5;
|
||||
+ sizeof(qint32) * 6;
|
||||
|
||||
auto result = QByteArray();
|
||||
result.reserve(size);
|
||||
|
@ -396,10 +396,11 @@ QByteArray Settings::serialize() const {
|
|||
<< qint32(!_weatherInCelsius ? 0 : *_weatherInCelsius ? 1 : 2)
|
||||
<< _tonsiteStorageToken
|
||||
<< qint32(_includeMutedCounterFolders ? 1 : 0)
|
||||
<< qint32(_ivZoom.current())
|
||||
<< qint32(0) // Old IV zoom
|
||||
<< qint32(_skipToastsInFocus ? 1 : 0)
|
||||
<< qint32(_recordVideoMessages ? 1 : 0)
|
||||
<< SerializeVideoQuality(_videoQuality);
|
||||
<< SerializeVideoQuality(_videoQuality)
|
||||
<< qint32(_ivZoom.current());
|
||||
}
|
||||
|
||||
Ensures(result.size() == size);
|
||||
|
@ -837,7 +838,8 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
|
|||
stream >> includeMutedCounterFolders;
|
||||
}
|
||||
if (!stream.atEnd()) {
|
||||
stream >> ivZoom;
|
||||
qint32 oldIvZoom = 0;
|
||||
stream >> oldIvZoom;
|
||||
}
|
||||
if (!stream.atEnd()) {
|
||||
stream >> skipToastsInFocus;
|
||||
|
@ -848,6 +850,9 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
|
|||
if (!stream.atEnd()) {
|
||||
stream >> videoQuality;
|
||||
}
|
||||
if (!stream.atEnd()) {
|
||||
stream >> ivZoom;
|
||||
}
|
||||
if (stream.status() != QDataStream::Ok) {
|
||||
LOG(("App Error: "
|
||||
"Bad data for Core::Settings::constructFromSerialized()"));
|
||||
|
|
|
@ -655,7 +655,9 @@ void Controller::createWebview(const Webview::StorageId &storageId) {
|
|||
if (const auto webviewZoomController = raw->zoomController()) {
|
||||
webviewZoomController->zoomValue(
|
||||
) | rpl::start_with_next([this](int value) {
|
||||
_delegate->ivSetZoom(value);
|
||||
if (value > 0) {
|
||||
_delegate->ivSetZoom(value);
|
||||
}
|
||||
}, lifetime());
|
||||
_delegate->ivZoomValue(
|
||||
) | rpl::start_with_next([=](int value) {
|
||||
|
|
Loading…
Add table
Reference in a new issue