forked from OpenGamers/abaddon
fix MESSAGE_UPDATE msgs that introduce an embed
This commit is contained in:
@@ -73,18 +73,16 @@ void ChatMessageItemContainer::UpdateContent() {
|
|||||||
if (m_text_component != nullptr)
|
if (m_text_component != nullptr)
|
||||||
m_text_component->get_buffer()->set_text(data->Content);
|
m_text_component->get_buffer()->set_text(data->Content);
|
||||||
|
|
||||||
if (m_embed_component != nullptr) {
|
if (m_embed_component != nullptr)
|
||||||
// easier to delete and remake than really update it
|
|
||||||
delete m_embed_component;
|
delete m_embed_component;
|
||||||
|
|
||||||
if (data->Embeds.size() == 1) {
|
if (data->Embeds.size() == 1) {
|
||||||
m_embed_component = CreateEmbedComponent(data);
|
m_embed_component = CreateEmbedComponent(data);
|
||||||
if (m_embed_imgurl.size() > 0) {
|
if (m_embed_imgurl.size() > 0) {
|
||||||
m_signal_image_load.emit(m_embed_imgurl);
|
m_signal_image_load.emit(m_embed_imgurl);
|
||||||
}
|
|
||||||
AttachMenuHandler(m_embed_component);
|
|
||||||
m_main->add(*m_embed_component);
|
|
||||||
}
|
}
|
||||||
|
AttachMenuHandler(m_embed_component);
|
||||||
|
m_main->add(*m_embed_component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user