Only override the DelegateType when showing hidden messages

This commit is contained in:
James Graham
2024-04-21 13:25:49 +02:00
parent 8b63c18f65
commit 031d69d996

View File

@@ -79,7 +79,7 @@ bool MessageFilterModel::eventIsVisible(int sourceRow, const QModelIndex &source
QVariant MessageFilterModel::data(const QModelIndex &index, int role) const
{
if (role == MessageEventModel::DelegateTypeRole) {
if (role == MessageEventModel::DelegateTypeRole && NeoChatConfig::self()->showAllEvents()) {
if (!eventIsVisible(index.row(), index.parent())) {
return DelegateType::Other;
}