mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Add 'Count unread messages' option.
This commit is contained in:
@@ -85,6 +85,8 @@ QByteArray AuthSessionSettings::serialize() const {
|
||||
stream << qint32(_variables.supportFixChatsOrder ? 1 : 0);
|
||||
stream << qint32(_variables.supportTemplatesAutocomplete ? 1 : 0);
|
||||
stream << qint32(_variables.supportChatsTimeSlice.current());
|
||||
stream << qint32(_variables.includeMutedCounter ? 1 : 0);
|
||||
stream << qint32(_variables.countUnreadMessages ? 1 : 0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -116,6 +118,8 @@ void AuthSessionSettings::constructFromSerialized(const QByteArray &serialized)
|
||||
qint32 supportFixChatsOrder = _variables.supportFixChatsOrder ? 1 : 0;
|
||||
qint32 supportTemplatesAutocomplete = _variables.supportTemplatesAutocomplete ? 1 : 0;
|
||||
qint32 supportChatsTimeSlice = _variables.supportChatsTimeSlice.current();
|
||||
qint32 includeMutedCounter = _variables.includeMutedCounter ? 1 : 0;
|
||||
qint32 countUnreadMessages = _variables.countUnreadMessages ? 1 : 0;
|
||||
|
||||
stream >> selectorTab;
|
||||
stream >> lastSeenWarningSeen;
|
||||
@@ -182,6 +186,10 @@ void AuthSessionSettings::constructFromSerialized(const QByteArray &serialized)
|
||||
if (!stream.atEnd()) {
|
||||
stream >> supportChatsTimeSlice;
|
||||
}
|
||||
if (!stream.atEnd()) {
|
||||
stream >> includeMutedCounter;
|
||||
stream >> countUnreadMessages;
|
||||
}
|
||||
if (stream.status() != QDataStream::Ok) {
|
||||
LOG(("App Error: "
|
||||
"Bad data for AuthSessionSettings::constructFromSerialized()"));
|
||||
@@ -243,6 +251,8 @@ void AuthSessionSettings::constructFromSerialized(const QByteArray &serialized)
|
||||
_variables.supportTemplatesAutocomplete = (supportTemplatesAutocomplete == 1);
|
||||
_variables.supportChatsTimeSlice = supportChatsTimeSlice;
|
||||
_variables.hadLegacyCallsPeerToPeerNobody = (legacyCallsPeerToPeer == kLegacyCallsPeerToPeerNobody);
|
||||
_variables.includeMutedCounter = (includeMutedCounter == 1);
|
||||
_variables.countUnreadMessages = (countUnreadMessages == 1);
|
||||
}
|
||||
|
||||
void AuthSessionSettings::setSupportChatsTimeSlice(int slice) {
|
||||
|
Reference in New Issue
Block a user