summary refs log tree commit diff
path: root/src/Cache.h
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-10-28 16:08:17 -0400
committertrilene <trilene@runbox.com>2020-10-28 16:08:17 -0400
commitfd479a91be3c0c7f3204c94ce499edb6cf7fbd77 (patch)
tree9225e0c824f4c0e578e73c7dfba48dfaef277884 /src/Cache.h
parentFix crash on exit (diff)
parentMake back button bigger as it is hard to tap with your thumb (diff)
downloadnheko-fd479a91be3c0c7f3204c94ce499edb6cf7fbd77.tar.xz
Merge remote-tracking branch 'upstream/master' into webrtc-video
Diffstat (limited to 'src/Cache.h')
-rw-r--r--src/Cache.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/Cache.h b/src/Cache.h

index 98e6cb75..4c4f7071 100644 --- a/src/Cache.h +++ b/src/Cache.h
@@ -28,11 +28,18 @@ #include <lmdb++.h> #endif -#include <mtx/responses.hpp> +#include <mtx/events/event_type.hpp> +#include <mtx/events/presence.hpp> +#include <mtx/responses/crypto.hpp> +#include <mtxclient/crypto/types.hpp> #include "CacheCryptoStructs.h" #include "CacheStructs.h" +namespace mtx::responses { +struct Notifications; +} + namespace cache { void init(const QString &user_id); @@ -94,8 +101,6 @@ getRoomVersion(lmdb::txn &txn, lmdb::dbi &statesdb); std::vector<RoomMember> getMembers(const std::string &room_id, std::size_t startIndex = 0, std::size_t len = 30); -void -saveState(const mtx::responses::Sync &res); bool isInitialized(); @@ -128,9 +133,6 @@ setCurrentFormat(); bool runMigrations(); -std::map<QString, mtx::responses::Timeline> -roomMessages(); - QMap<QString, mtx::responses::Notifications> getTimelineMentions(); @@ -182,22 +184,8 @@ saveImage(const QString &url, const QByteArray &data); RoomInfo singleRoomInfo(const std::string &room_id); -std::vector<std::string> -roomsWithStateUpdates(const mtx::responses::Sync &res); -std::vector<std::string> -roomsWithTagUpdates(const mtx::responses::Sync &res); std::map<QString, RoomInfo> getRoomInfo(const std::vector<std::string> &rooms); -inline std::map<QString, RoomInfo> -roomUpdates(const mtx::responses::Sync &sync) -{ - return getRoomInfo(roomsWithStateUpdates(sync)); -} -inline std::map<QString, RoomInfo> -roomTagUpdates(const mtx::responses::Sync &sync) -{ - return getRoomInfo(roomsWithTagUpdates(sync)); -} //! Calculates which the read status of a room. //! Whether all the events in the timeline have been read.