2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Track dialog row offline status by timer.

Fixes #6410.
This commit is contained in:
John Preston
2022-10-24 11:22:26 +04:00
parent 0cba9e4a22
commit ed895ace66
10 changed files with 104 additions and 26 deletions

View File

@@ -945,6 +945,7 @@ void Updates::updateOnline(crl::time lastNonIdleTime, bool gotOtherOffline) {
Data::PeerUpdate::Flag::OnlineStatus);
if (!isOnline) { // Went offline, so we need to save message draft to the cloud.
api().saveCurrentDraftToCloud();
session().data().maybeStopWatchForOffline(self);
}
_lastSetOnline = ms;
@@ -1856,6 +1857,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
session().changes().peerUpdated(
user,
Data::PeerUpdate::Flag::OnlineStatus);
session().data().maybeStopWatchForOffline(user);
}
if (UserId(d.vuser_id()) == session().userId()) {
if (d.vstatus().type() == mtpc_userStatusOffline