mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Setting for cloud stickers suggestions.
This commit is contained in:
@@ -571,6 +571,7 @@ enum {
|
||||
dbiLangPackKey = 0x4e,
|
||||
dbiConnectionType = 0x4f,
|
||||
dbiStickersFavedLimit = 0x50,
|
||||
dbiSuggestStickersByEmoji = 0x51,
|
||||
|
||||
dbiEncryptedWithSalt = 333,
|
||||
dbiEncrypted = 444,
|
||||
@@ -998,6 +999,14 @@ bool _readSetting(quint32 blockId, QDataStream &stream, int version, ReadSetting
|
||||
Global::SetSoundNotify(v == 1);
|
||||
} break;
|
||||
|
||||
case dbiSuggestStickersByEmoji: {
|
||||
qint32 v;
|
||||
stream >> v;
|
||||
if (!_checkStreamStatus(stream)) return false;
|
||||
|
||||
Global::SetSuggestStickersByEmoji(v == 1);
|
||||
} break;
|
||||
|
||||
case dbiAutoDownload: {
|
||||
qint32 photo, audio, gif;
|
||||
stream >> photo >> audio >> gif;
|
||||
@@ -1766,7 +1775,7 @@ void _writeUserSettings() {
|
||||
? userDataInstance->serialize()
|
||||
: QByteArray();
|
||||
|
||||
uint32 size = 21 * (sizeof(quint32) + sizeof(qint32));
|
||||
uint32 size = 22 * (sizeof(quint32) + sizeof(qint32));
|
||||
size += sizeof(quint32) + Serialize::stringSize(Global::AskDownloadPath() ? QString() : Global::DownloadPath()) + Serialize::bytearraySize(Global::AskDownloadPath() ? QByteArray() : Global::DownloadPathBookmark());
|
||||
|
||||
size += sizeof(quint32) + sizeof(qint32);
|
||||
@@ -1809,6 +1818,7 @@ void _writeUserSettings() {
|
||||
data.stream << quint32(dbiModerateMode) << qint32(Global::ModerateModeEnabled() ? 1 : 0);
|
||||
data.stream << quint32(dbiAutoPlay) << qint32(cAutoPlayGif() ? 1 : 0);
|
||||
data.stream << quint32(dbiUseExternalVideoPlayer) << qint32(cUseExternalVideoPlayer());
|
||||
data.stream << quint32(dbiSuggestStickersByEmoji) << qint32(Global::SuggestStickersByEmoji() ? 1 : 0);
|
||||
if (!userData.isEmpty()) {
|
||||
data.stream << quint32(dbiAuthSessionSettings) << userData;
|
||||
}
|
||||
|
Reference in New Issue
Block a user