Remember Space

Save the last space entered so it can be recalled on startup
This commit is contained in:
James Graham
2024-02-10 14:51:57 +00:00
parent 413453dd85
commit 3a4b531edf
3 changed files with 28 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
#include <QQmlEngine>
#include <Quotient/room.h>
#include <Quotient/uriresolver.h>
#include <KConfigGroup>
#include "chatdocumenthandler.h"
#include "enums/delegatetype.h"
@@ -87,6 +88,11 @@ class RoomManager : public QObject, public UriResolverBase
*/
Q_PROPERTY(bool hasOpenRoom READ hasOpenRoom NOTIFY currentRoomChanged)
/**
* @brief The room ID of the last space entered.
*/
Q_PROPERTY(QString lastSpaceId READ lastSpaceId CONSTANT)
/**
* @brief The ChatDocumentHandler for the open room.
*
@@ -200,6 +206,8 @@ public:
*/
void setUrlArgument(const QString &arg);
QString lastSpaceId();
NeoChatConnection *connection() const;
void setConnection(NeoChatConnection *connection);
@@ -331,6 +339,7 @@ private:
QString m_arg;
KSharedConfig::Ptr m_config;
KConfigGroup m_lastRoomConfig;
KConfigGroup m_lastSpaceConfig;
QPointer<ChatDocumentHandler> m_chatDocumentHandler;
TimelineModel *m_timelineModel;