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

Add button to download audio files.

This commit is contained in:
John Preston
2019-03-15 16:09:05 +04:00
parent bc2b0f8392
commit d646de7184
16 changed files with 193 additions and 27 deletions

View File

@@ -15,6 +15,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace {
// User with hidden last seen stays online in UI for such amount of seconds.
constexpr auto kSetOnlineAfterActivity = TimeId(30);
using UpdateFlag = Notify::PeerUpdate::Flag;
} // namespace
@@ -213,10 +216,10 @@ void UserData::madeAction(TimeId when) {
if (isBot() || isServiceUser() || when <= 0) {
return;
} else if (onlineTill <= 0 && -onlineTill < when) {
onlineTill = -when - SetOnlineAfterActivity;
onlineTill = -when - kSetOnlineAfterActivity;
Notify::peerUpdatedDelayed(this, Notify::PeerUpdate::Flag::UserOnlineChanged);
} else if (onlineTill > 0 && onlineTill < when + 1) {
onlineTill = when + SetOnlineAfterActivity;
onlineTill = when + kSetOnlineAfterActivity;
Notify::peerUpdatedDelayed(this, Notify::PeerUpdate::Flag::UserOnlineChanged);
}
}