From 345dca35444771267f51fe011c62e5d135695069 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 25 Aug 2018 21:08:43 +0300 Subject: Add method to delete old messages periodically fixes #413 --- src/ChatPage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ChatPage.cpp') 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()); } -- cgit 1.5.1