Skip to content
Snippets Groups Projects
Commit 368e13fa authored by Loren Burkholder's avatar Loren Burkholder
Browse files

Use built-in sorting so that dynamic updates work

parent 7e538851
No related branches found
No related tags found
No related merge requests found
Pipeline #1490 passed
......@@ -125,11 +125,6 @@ ReadReceiptsProxy::ReadReceiptsProxy(QString event_id, QString room_id, QObject
{
setSourceModel(&model_);
setSortRole(ReadReceiptsModel::RawTimestamp);
}
bool
ReadReceiptsProxy::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const
{
// since we are sorting from greatest to least timestamp, return something that looks totally backwards!
return source_left.data().toULongLong() > source_right.data().toULongLong();
sort(0, Qt::DescendingOrder);
setDynamicSortFilter(true);
}
......@@ -63,8 +63,6 @@ public:
QString eventId() const { return event_id_; }
QString roomId() const { return room_id_; }
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
private:
QString event_id_;
QString room_id_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment