2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use server time in dialogs list sorting.

This way it won't mess up when you change your local time.
This commit is contained in:
John Preston
2018-07-31 17:34:14 +03:00
parent f68cefbdc1
commit 9972f7b90e
10 changed files with 47 additions and 42 deletions

View File

@@ -65,7 +65,7 @@ public:
return _sortKeyInChatList;
}
void updateChatListSortPosition();
void setChatsListDate(QDateTime date);
void setChatsListTimeId(TimeId date);
virtual void updateChatListExistence();
bool needUpdateInChatList() const;
@@ -94,8 +94,8 @@ public:
paintUserpic(p, rtl() ? (w - x - size) : x, y, size);
}
QDateTime chatsListDate() const {
return _lastMessageDate;
TimeId chatsListTimeId() const {
return _lastMessageTimeId;
}
virtual ~Entry() = default;
@@ -104,7 +104,7 @@ public:
mutable Text lastItemTextCache;
private:
virtual QDateTime adjustChatListDate() const;
virtual TimeId adjustChatListTimeId() const;
virtual void changedInChatListHook(Dialogs::Mode list, bool added);
virtual void changedChatListPinHook();
@@ -118,7 +118,7 @@ private:
uint64 _sortKeyInChatList = 0;
int _pinnedIndex = 0;
bool _isProxyPromoted = false;
QDateTime _lastMessageDate;
TimeId _lastMessageTimeId = 0;
};