summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-07-28 21:31:37 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-07-29 21:07:52 -0400
commit7e538851d6e3779434722e56a968e9f8b8a9da0d (patch)
tree8147ac95a7e17b66c398cb3d09185d3194f5520b /src/timeline
parentReset model instead of doing weird convoluted updates (diff)
downloadnheko-7e538851d6e3779434722e56a968e9f8b8a9da0d.tar.xz
Use a QSortFilterProxyModel instead of resetting the model
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/TimelineModel.cpp2
-rw-r--r--src/timeline/TimelineModel.h2
-rw-r--r--src/timeline/TimelineViewManager.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index f5737063..6ae0c4d1 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1092,7 +1092,7 @@ TimelineModel::relatedInfo(QString id) void TimelineModel::showReadReceipts(QString id) { - emit openReadReceiptsDialog(new ReadReceiptsModel{id, roomId(), this}); + emit openReadReceiptsDialog(new ReadReceiptsProxy{id, roomId(), this}); } void diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 82fce257..0d5f7109 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h
@@ -349,7 +349,7 @@ signals: void typingUsersChanged(std::vector<QString> users); void replyChanged(QString reply); void editChanged(QString reply); - void openReadReceiptsDialog(ReadReceiptsModel *rr); + void openReadReceiptsDialog(ReadReceiptsProxy *rr); void paginationInProgressChanged(const bool); void newCallEvent(const mtx::events::collections::TimelineEvents &event); void scrollToIndex(int index); diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 58b0d5a8..76bc127e 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -206,12 +206,12 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par 0, "InviteesModel", "InviteesModel needs to be instantiated on the C++ side"); - qmlRegisterUncreatableType<ReadReceiptsModel>( + qmlRegisterUncreatableType<ReadReceiptsProxy>( "im.nheko", 1, 0, - "ReadReceiptsModel", - "ReadReceiptsModel needs to be instantiated on the C++ side"); + "ReadReceiptsProxy", + "ReadReceiptsProxy needs to be instantiated on the C++ side"); static auto self = this; qmlRegisterSingletonType<MainWindow>(