Updates based on comments

This commit is contained in:
James Graham
2023-07-31 17:48:00 +01:00
parent 980211f36a
commit 648fff20f2
6 changed files with 20 additions and 5 deletions

View File

@@ -5,12 +5,14 @@
#include "messageeventmodel.h"
#include "neochatroom.h"
#include <QGuiApplication>
#include <Quotient/connection.h>
#include <Quotient/events/stickerevent.h>
#include <KLocalizedString>
#include <Quotient/connection.h>
using namespace Quotient;
// TODO search only in the current room
@@ -18,6 +20,9 @@ using namespace Quotient;
SearchModel::SearchModel(QObject *parent)
: QAbstractListModel(parent)
{
connect(static_cast<QGuiApplication *>(QGuiApplication::instance()), &QGuiApplication::paletteChanged, this, [this] {
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), {AuthorRole, ReadMarkersRole});
});
}
QString SearchModel::searchText() const