2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-11 14:06:25 +00:00

Update API scheme on layer 172.

This commit is contained in:
John Preston
2024-01-15 11:36:17 +04:00
parent 1cfad14437
commit 6e31993777
22 changed files with 343 additions and 245 deletions

View File

@@ -598,7 +598,9 @@ void ContactsBoxController::sortByOnline() {
const auto now = base::unixtime::now();
const auto key = [&](const PeerListRow &row) {
const auto user = row.peer()->asUser();
return user ? (std::min(user->onlineTill, now) + 1) : TimeId();
return user
? (std::min(user->lastseen().onlineTill(), now + 1) + 1)
: TimeId();
};
const auto predicate = [&](const PeerListRow &a, const PeerListRow &b) {
return key(a) > key(b);