sync gif emotes of same length
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -22,6 +22,7 @@ void GIFTimer::initialize()
|
||||
qApp->activeWindow() == nullptr)
|
||||
return;
|
||||
|
||||
this->position_ += gifFrameLength;
|
||||
this->signal.invoke();
|
||||
getApp()->windows->repaintGifEmotes();
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user