mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Beta version 1.6.6: Fix animations engine.
This commit is contained in:
@@ -94,7 +94,7 @@ inline bool in_range(Value &&value, From &&from, Till &&till) {
|
||||
#define for_const(range_declaration, range_expression) for (range_declaration : std::as_const(range_expression))
|
||||
|
||||
template <typename Lambda>
|
||||
inline void InvokeQueued(QObject *context, Lambda &&lambda) {
|
||||
inline void InvokeQueued(const QObject *context, Lambda &&lambda) {
|
||||
QObject proxy;
|
||||
QObject::connect(&proxy, &QObject::destroyed, context, std::forward<Lambda>(lambda), Qt::QueuedConnection);
|
||||
}
|
||||
|
@@ -121,7 +121,7 @@ void Manager::updateQueued() {
|
||||
Expects(_timerId == 0);
|
||||
|
||||
_timerId = -1;
|
||||
crl::on_main(delayedCallGuard(), [=] {
|
||||
InvokeQueued(delayedCallGuard(), [=] {
|
||||
Expects(_timerId < 0);
|
||||
|
||||
_timerId = 0;
|
||||
@@ -142,7 +142,7 @@ void Manager::schedule() {
|
||||
_forceImmediateUpdate = false;
|
||||
updateQueued();
|
||||
} else {
|
||||
const auto next = _lastUpdateTime + kAnimationTimeout;
|
||||
const auto next = _lastUpdateTime + kAnimationTick;
|
||||
const auto now = crl::now();
|
||||
if (now < next) {
|
||||
_timerId = startTimer(next - now, Qt::PreciseTimer);
|
||||
|
Reference in New Issue
Block a user