diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-11-22 16:51:49 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-11-22 16:53:59 +0900 |
commit | 5fb74ca3d253b658fe77aaeb6a106cf6c0a9e7f0 (patch) | |
tree | 203d3533550e6c665220578f7922317833efb22c /lib/connection.h | |
parent | 0c3a45356a803baa0eb5e553262a85cac897ac4f (diff) | |
download | libquotient-5fb74ca3d253b658fe77aaeb6a106cf6c0a9e7f0.tar.gz libquotient-5fb74ca3d253b658fe77aaeb6a106cf6c0a9e7f0.zip |
Save state cache per-room
Closes #257.
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/connection.h b/lib/connection.h index 20dade76..20a1f47e 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -280,7 +280,7 @@ namespace QMatrixClient * to be QML-friendly. Empty parameter means using a path * defined by stateCachePath(). */ - Q_INVOKABLE void loadState(const QUrl &fromFile = {}); + Q_INVOKABLE void loadState(); /** * This method saves the current state of rooms (but not messages * in them) to a local cache file, so that it could be loaded by @@ -290,7 +290,10 @@ namespace QMatrixClient * QML-friendly. Empty parameter means using a path defined by * stateCachePath(). */ - Q_INVOKABLE void saveState(const QUrl &toFile = {}) const; + Q_INVOKABLE void saveState() const; + + /// This method saves the current state of a single room. + void saveRoomState(Room* r) const; /** * The default path to store the cached room state, defined as |