2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

gif size decreased, error message added for gif errors, enable many gifs playing at the same time

This commit is contained in:
John Preston
2015-12-16 18:04:02 +03:00
parent fdb93f700d
commit ae78d13284
8 changed files with 44 additions and 26 deletions

View File

@@ -550,7 +550,7 @@ void Application::startUpdateCheck(bool forceWait) {
if (updateRequestId || updateThread || updateReply || !cAutoUpdate()) return;
int32 constDelay = cBetaVersion() ? 600 : UpdateDelayConstPart, randDelay = cBetaVersion() ? 300 : UpdateDelayRandPart;
int32 updateInSecs = cLastUpdateCheck() + constDelay + (rand() % randDelay) - unixtime();
int32 updateInSecs = cLastUpdateCheck() + constDelay + int32(MTP::nonce<uint32>() % randDelay) - unixtime();
bool sendRequest = (updateInSecs <= 0 || updateInSecs > (constDelay + randDelay));
if (!sendRequest && !forceWait) {
QDir updates(cWorkingDir() + "tupdates");