mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed image size now updating on load
This commit is contained in:
parent
878daf6eee
commit
bb76a632f4
|
@ -261,15 +261,14 @@ void Image::load()
|
||||||
QImageReader reader(&buffer);
|
QImageReader reader(&buffer);
|
||||||
|
|
||||||
this->frames_ = readFrames(reader, this->url());
|
this->frames_ = readFrames(reader, this->url());
|
||||||
return Success;
|
|
||||||
|
if (!loadedEventQueued) {
|
||||||
|
QTimer::singleShot(150, [] {
|
||||||
|
getApp()->windows->forceLayoutChannelViews();
|
||||||
|
loadedEventQueued = false;
|
||||||
});
|
});
|
||||||
req.onError([this, weak = weakOf(this)](int) {
|
}
|
||||||
auto shared = weak.lock();
|
return Success;
|
||||||
if (!shared) return false;
|
|
||||||
|
|
||||||
this->frames_ = std::vector<Frame>();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
req.execute();
|
req.execute();
|
||||||
|
|
Loading…
Reference in a new issue