chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
+3 -3
View File
@@ -50,7 +50,7 @@ Frames::Frames(QList<Frame> &&frames)
DebugCount::increase("animated images");
this->gifTimerConnection_ =
getIApp()->getEmotes()->getGIFTimer().signal.connect([this] {
getApp()->getEmotes()->getGIFTimer().signal.connect([this] {
this->advance();
});
}
@@ -67,7 +67,7 @@ Frames::Frames(QList<Frame> &&frames)
else
{
this->durationOffset_ = std::min<int>(
int(getIApp()->getEmotes()->getGIFTimer().position() % totalLength),
int(getApp()->getEmotes()->getGIFTimer().position() % totalLength),
60000);
}
this->processOffset();
@@ -242,7 +242,7 @@ void assignFrames(std::weak_ptr<Image> weak, QList<Frame> parsed)
isPushQueued = true;
postToThread([] {
isPushQueued = false;
getIApp()->getWindows()->forceLayoutChannelViews();
getApp()->getWindows()->forceLayoutChannelViews();
});
}
};