Add pagination to space hierarchy cache

Add pagination to space hierarchy cache to ensure all rooms get cached.
This commit is contained in:
James Graham
2024-03-29 15:03:50 +00:00
parent 2608d879fa
commit e87da0feb0
2 changed files with 36 additions and 12 deletions

View File

@@ -10,6 +10,8 @@
#include <QQmlEngine>
#include <QString>
#include <Quotient/csapi/space_hierarchy.h>
#include "neochatconnection.h"
namespace Quotient
@@ -110,6 +112,9 @@ private:
QList<QString> m_activeSpaceRooms;
QHash<QString, QList<QString>> m_spaceHierarchy;
void cacheSpaceHierarchy();
QHash<QString, Quotient::Omittable<QString>> m_nextBatchTokens;
void populateSpaceHierarchy(const QString &spaceId);
void addBatch(const QString &spaceId, Quotient::GetSpaceHierarchyJob *job);
NeoChatConnection *m_connection;
};