mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Replaced snap util function with std::clamp.
This commit is contained in:
@@ -354,7 +354,7 @@ void ApiWrap::requestTermsUpdate() {
|
||||
|
||||
const auto requestNext = [&](auto &&data) {
|
||||
const auto timeout = (data.vexpires().v - base::unixtime::now());
|
||||
_termsUpdateSendAt = crl::now() + snap(
|
||||
_termsUpdateSendAt = crl::now() + std::clamp(
|
||||
timeout * crl::time(1000),
|
||||
kTermsUpdateTimeoutMin,
|
||||
kTermsUpdateTimeoutMax);
|
||||
|
Reference in New Issue
Block a user