Skip to content

Commit

Permalink
Alias ThreadView
Browse files Browse the repository at this point in the history
  • Loading branch information
nvrWhere committed Dec 4, 2024
1 parent cfe6e4f commit 267517a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Q_DECL_HIDDEN Room::Private {
// about the timeline.
EventStats partiallyReadStats {}, unreadStats {};

QHash<QString, Thread> threads;
ThreadView threads;

// For storing a list of current member names for the purpose of disambiguation.
QMultiHash<QString, QString> memberNameMap;
Expand Down Expand Up @@ -560,7 +560,7 @@ const Room::PendingEvents& Room::pendingEvents() const
return d->unsyncedEvents;
}

const QHash<QString, Thread>& Room::threads() const { return d->threads; }
const Room::ThreadView& Room::threads() const { return d->threads; }

int Room::requestedHistorySize() const
{
Expand Down
3 changes: 2 additions & 1 deletion Quotient/room.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class QUOTIENT_API Room : public QObject {
using RelatedEvents = QVector<const RoomEvent*>;
using rev_iter_t = Timeline::const_reverse_iterator;
using timeline_iter_t = Timeline::const_iterator;
using ThreadView = QHash<QString, Thread>;

//! \brief Room changes that can be tracked using Room::changed() signal
//!
Expand Down Expand Up @@ -365,7 +366,7 @@ class QUOTIENT_API Room : public QObject {
//! Same as messageEvents().crend()
rev_iter_t historyEdge() const;

const QHash<QString, Thread>& threads() const;
const ThreadView& threads() const;

//! \brief Get an iterator for the position beyond the latest arrived event
//!
Expand Down

0 comments on commit 267517a

Please sign in to comment.