mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
maybe slightly better image loading maybe hopefully
This commit is contained in:
@@ -210,11 +210,11 @@ void ChatWindow::ProcessNewMessage(Snowflake id, bool prepend) {
|
||||
});
|
||||
content->signal_image_load().connect([this, id](std::string url) {
|
||||
auto &mgr = Abaddon::Get().GetImageManager();
|
||||
mgr.LoadFromURL(url, [this, id](Glib::RefPtr<Gdk::Pixbuf> buf) {
|
||||
mgr.LoadFromURL(url, [this, id, url](Glib::RefPtr<Gdk::Pixbuf> buf) {
|
||||
if (m_id_to_widget.find(id) != m_id_to_widget.end()) {
|
||||
auto *x = dynamic_cast<ChatMessageItemContainer *>(m_id_to_widget.at(id));
|
||||
if (x != nullptr)
|
||||
x->UpdateImage();
|
||||
x->UpdateImage(url, buf);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user