2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Fix possible race conditions in msgid().

This commit is contained in:
John Preston
2019-07-10 19:28:33 +02:00
parent 68b1024dd4
commit c5df4db621
63 changed files with 513 additions and 391 deletions

View File

@@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat.h"
#include "data/data_user.h"
#include "data/data_peer_values.h"
#include "base/unixtime.h"
#include "lang/lang_keys.h"
#include "mainwindow.h"
#include "mainwidget.h"
@@ -2889,7 +2890,7 @@ void InnerWidget::userOnlineUpdated(const Notify::PeerUpdate &update) {
const auto visible = (top < _visibleBottom)
&& (top + st::dialogsRowHeight > _visibleTop);
row->setOnline(
Data::OnlineTextActive(user, unixtime()),
Data::OnlineTextActive(user, base::unixtime::now()),
visible ? Fn<void()>(crl::guard(this, repaint)) : nullptr);
}
}