sync gif emotes of same length

This commit is contained in:
fourtf
2020-02-16 14:24:11 +01:00
parent 59296075e8
commit 6229b2f434
5 changed files with 22 additions and 8 deletions
-2
View File
@@ -2,8 +2,6 @@
#include "common/Singleton.hpp"
#define GIF_FRAME_LENGTH 33
#include "providers/bttv/BttvEmotes.hpp"
#include "providers/emoji/Emojis.hpp"
#include "providers/ffz/FfzEmotes.hpp"
+1
View File
@@ -22,6 +22,7 @@ void GIFTimer::initialize()
qApp->activeWindow() == nullptr)
return;
this->position_ += gifFrameLength;
this->signal.invoke();
getApp()->windows->repaintGifEmotes();
});
+7
View File
@@ -5,15 +5,22 @@
namespace chatterino {
constexpr long unsigned gifFrameLength = 33;
class GIFTimer
{
public:
void initialize();
pajlada::Signals::NoArgSignal signal;
long unsigned position()
{
return this->position_;
}
private:
QTimer timer;
long unsigned position_{};
};
} // namespace chatterino