diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-08-25 21:08:43 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-08-25 21:08:43 +0300 |
commit | 345dca35444771267f51fe011c62e5d135695069 (patch) | |
tree | a36cfbc42308c02caf608afa6049b7423e85614e /src/ChatPage.cpp | |
parent | Bump version to v0.5.4 (diff) | |
download | nheko-345dca35444771267f51fe011c62e5d135695069.tar.xz |
Add method to delete old messages periodically
fixes #413
Diffstat (limited to '')
-rw-r--r-- | src/ChatPage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 9f408a73..250d106d 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -1070,6 +1070,11 @@ ChatPage::trySync() emit syncTopBar(updates); emit syncRoomlist(updates); + + cache::client()->deleteOldData(); + } catch (const lmdb::map_full_error &e) { + nhlog::db()->error("lmdb is full: {}", e.what()); + cache::client()->deleteOldData(); } catch (const lmdb::error &e) { nhlog::db()->error("saving sync response: {}", e.what()); } |