Fix search results on room search page
Add missing IsEditable role to search model
This commit is contained in:
@@ -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"},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
IsThreadedRole,
|
||||
ThreadRootRole,
|
||||
ContentModelRole,
|
||||
IsEditableRole,
|
||||
};
|
||||
Q_ENUM(Roles)
|
||||
explicit SearchModel(QObject *parent = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user