mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
move avatar stuff out of chatwindow
This commit is contained in:
@@ -192,19 +192,6 @@ void ChatWindow::ProcessNewMessage(Snowflake id, bool prepend) {
|
||||
});
|
||||
|
||||
m_num_rows++;
|
||||
Abaddon::Get().GetImageManager().LoadFromURL(user->GetAvatarURL("png", "32"), [this, user_id](Glib::RefPtr<Gdk::Pixbuf> buf) {
|
||||
Glib::signal_idle().connect([this, buf, user_id]() -> bool {
|
||||
auto children = m_list->get_children();
|
||||
for (auto child : children) {
|
||||
auto *row = dynamic_cast<ChatMessageHeader *>(child);
|
||||
if (row == nullptr) continue;
|
||||
if (row->UserID == user_id)
|
||||
row->SetAvatarFromPixbuf(buf);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
auto *content = CreateMessageComponent(id);
|
||||
|
||||
Reference in New Issue
Block a user