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,16 +261,15 @@ void Image::load()
|
||||||
QImageReader reader(&buffer);
|
QImageReader reader(&buffer);
|
||||||
|
|
||||||
this->frames_ = readFrames(reader, this->url());
|
this->frames_ = readFrames(reader, this->url());
|
||||||
|
|
||||||
|
if (!loadedEventQueued) {
|
||||||
|
QTimer::singleShot(150, [] {
|
||||||
|
getApp()->windows->forceLayoutChannelViews();
|
||||||
|
loadedEventQueued = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
return Success;
|
return Success;
|
||||||
});
|
});
|
||||||
req.onError([this, weak = weakOf(this)](int) {
|
|
||||||
auto shared = weak.lock();
|
|
||||||
if (!shared) return false;
|
|
||||||
|
|
||||||
this->frames_ = std::vector<Frame>();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
req.execute();
|
req.execute();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue