mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +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:
@@ -1784,9 +1784,9 @@ void DialogsInner::applyDialog(const MTPDdialog &dialog) {
|
||||
history->applyDialog(dialog);
|
||||
|
||||
if (!history->useProxyPromotion() && !history->isPinnedDialog()) {
|
||||
const auto date = history->chatsListDate();
|
||||
if (!date.isNull()) {
|
||||
addSavedPeersAfter(date);
|
||||
const auto date = history->chatsListTimeId();
|
||||
if (date != 0) {
|
||||
addSavedPeersAfter(ParseDateTime(date));
|
||||
}
|
||||
}
|
||||
_contactsNoDialogs->del(history);
|
||||
@@ -1818,7 +1818,7 @@ void DialogsInner::addSavedPeersAfter(const QDateTime &date) {
|
||||
auto &saved = cRefSavedPeersByTime();
|
||||
while (!saved.isEmpty() && (date.isNull() || date < saved.lastKey())) {
|
||||
const auto history = App::history(saved.last()->id);
|
||||
history->setChatsListDate(saved.lastKey());
|
||||
history->setChatsListTimeId(ServerTimeFromParsed(saved.lastKey()));
|
||||
_contactsNoDialogs->del(history);
|
||||
saved.remove(saved.lastKey(), saved.last());
|
||||
}
|
||||
|
Reference in New Issue
Block a user