Fix search results on room search page

Add missing IsEditable role to search model
This commit is contained in:
James Lyne
2024-06-14 15:21:49 +01:00
committed by Tobias Fella
parent 23b0c8a143
commit 0aec9f8472
2 changed files with 5 additions and 0 deletions

View File

@@ -122,6 +122,9 @@ QVariant SearchModel::data(const QModelIndex &index, int role) const
}
return {};
}
case IsEditableRole: {
return false;
}
}
return DelegateType::Message;
}
@@ -158,6 +161,7 @@ QHash<int, QByteArray> SearchModel::roleNames() const
{IsThreadedRole, "isThreaded"},
{ThreadRootRole, "threadRoot"},
{ContentModelRole, "contentModel"},
{IsEditableRole, "isEditable"},
};
}

View File

@@ -71,6 +71,7 @@ public:
IsThreadedRole,
ThreadRootRole,
ContentModelRole,
IsEditableRole,
};
Q_ENUM(Roles)
explicit SearchModel(QObject *parent = nullptr);