mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 22:27:20 +02:00
Guarded timers for online processing in touchbar's PinnedDialogButton.
This commit is contained in:
parent
b8b268c7cc
commit
93ae5e71f7
1 changed files with 2 additions and 1 deletions
|
@ -575,7 +575,8 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
|
|||
if (pin->onlineTill) {
|
||||
const auto time = pin->onlineTill - base::unixtime::now();
|
||||
if (time > 0) {
|
||||
onlineTimer->callOnce(time * crl::time(1000));
|
||||
onlineTimer->callOnce(std::min(86400, time)
|
||||
* crl::time(1000));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue