Fixes #161
This commit is contained in:
@@ -11,18 +11,19 @@ void GIFTimer::initialize()
|
||||
this->timer.setInterval(30);
|
||||
|
||||
getSettings()->enableGifAnimations.connect([this](bool enabled, auto) {
|
||||
if (enabled) {
|
||||
if (enabled)
|
||||
this->timer.start();
|
||||
} else {
|
||||
else
|
||||
this->timer.stop();
|
||||
}
|
||||
});
|
||||
|
||||
QObject::connect(&this->timer, &QTimer::timeout, [this] {
|
||||
if (getSettings()->enableAnimationsWhenFocused &&
|
||||
qApp->activeWindow() == nullptr)
|
||||
return;
|
||||
|
||||
this->signal.invoke();
|
||||
// fourtf:
|
||||
auto app = getApp();
|
||||
app->windows->repaintGifEmotes();
|
||||
getApp()->windows->repaintGifEmotes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user