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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user