Fix the link preview insert lambda to make sure that it doesn't crash

Fix the link preview insert lambda to make sure that it doesn't crash and also make sure that the system doesn't lock up on link preview load
This commit is contained in:
James Graham
2025-08-30 12:49:11 +01:00
parent 69568c628f
commit 8ad822fd0b
2 changed files with 4 additions and 3 deletions

View File

@@ -259,7 +259,7 @@ MessageComponent MessageContentModel::linkPreviewComponent(const QUrl &link)
it->type = MessageComponentType::LinkPreview;
Q_EMIT dataChanged(index(it - m_components.begin()), index(it - m_components.begin()), {ComponentTypeRole});
}
return it;
return ++it;
});
}
});