mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-12 06:33:59 +00:00
Added per-field comments to session settings size computation.
This commit is contained in:
@@ -35,17 +35,37 @@ SessionSettings::SessionSettings()
|
||||
|
||||
QByteArray SessionSettings::serialize() const {
|
||||
const auto autoDownload = _autoDownload.serialize();
|
||||
auto size = sizeof(qint32) * 4
|
||||
auto size = sizeof(qint32) // kVersionTag
|
||||
+ sizeof(qint32) // kVersion
|
||||
+ sizeof(qint32) // _selectorTab
|
||||
+ sizeof(qint32) // _groupStickersSectionHidden size
|
||||
+ _groupStickersSectionHidden.size() * sizeof(quint64)
|
||||
+ sizeof(qint32) * 4
|
||||
+ sizeof(qint32) // _supportSwitch
|
||||
+ sizeof(qint32) // _supportFixChatsOrder
|
||||
+ sizeof(qint32) // _supportTemplatesAutocomplete
|
||||
+ sizeof(qint32) // _supportChatsTimeSlice
|
||||
+ Serialize::bytearraySize(autoDownload)
|
||||
+ sizeof(qint32) * 11
|
||||
+ sizeof(qint32) // _supportAllSearchResults
|
||||
+ sizeof(qint32) // _archiveCollapsed
|
||||
+ sizeof(qint32) // _archiveInMainMenu
|
||||
+ sizeof(qint32) // old _skipArchiveInSearch
|
||||
+ sizeof(qint32) // old _mediaLastPlaybackPosition size
|
||||
+ sizeof(qint32) // very very old _hiddenPinnedMessages size
|
||||
+ sizeof(qint32) // _dialogsFiltersEnabled
|
||||
+ sizeof(qint32) // _supportAllSilent
|
||||
+ sizeof(qint32) // _photoEditorHintShowsCount
|
||||
+ sizeof(qint32) // very old _hiddenPinnedMessages size
|
||||
+ sizeof(qint32) // _mutePeriods size
|
||||
+ (_mutePeriods.size() * sizeof(quint64))
|
||||
+ sizeof(qint32) * 3
|
||||
+ sizeof(qint32) // old _skipPremiumStickersSet
|
||||
+ sizeof(qint32) // old _hiddenPinnedMessages size
|
||||
+ sizeof(qint32) // _groupEmojiSectionHidden size
|
||||
+ _groupEmojiSectionHidden.size() * sizeof(quint64)
|
||||
+ sizeof(qint32) * 3
|
||||
+ sizeof(qint32) // _lastNonPremiumLimitDownload
|
||||
+ sizeof(qint32) // _lastNonPremiumLimitUpload
|
||||
+ sizeof(qint32) // _hiddenPinnedMessages size
|
||||
+ _hiddenPinnedMessages.size() * (sizeof(quint64) * 4)
|
||||
+ sizeof(qint32)
|
||||
+ sizeof(qint32) // legacy subsection tabs modes count
|
||||
+ sizeof(qint32) // _ringtoneDefaultVolumes size
|
||||
+ (_ringtoneDefaultVolumes.size()
|
||||
* (0
|
||||
@@ -67,8 +87,8 @@ QByteArray SessionSettings::serialize() const {
|
||||
size += sizeof(qint32); // _setupEmailState
|
||||
size += sizeof(qint32) // _moderateCommonGroups size
|
||||
+ (_moderateCommonGroups.size() * sizeof(qint32));
|
||||
size += sizeof(qint32);
|
||||
size += sizeof(qint32)
|
||||
size += sizeof(qint32); // _disableSharingBoxShowsCount
|
||||
size += sizeof(qint32) // _subsectionTabsModes size
|
||||
+ _subsectionTabsModes.size() * (sizeof(quint64) + sizeof(qint32));
|
||||
size += sizeof(qint32); // _phoneNumberHidden
|
||||
size += sizeof(qint32); // _extraFavoriteReactions size
|
||||
|
||||
Reference in New Issue
Block a user