Only override the DelegateType when showing hidden messages

(cherry picked from commit 031d69d996)
This commit is contained in:
James Graham
2024-04-21 13:25:49 +02:00
committed by Tobias Fella
parent 8517636485
commit eba34b19ad

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;
}