summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 58eb2630..b2db9edd 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -3182,9 +3182,11 @@ Cache::clearTimeline(const std::string &room_id) break; } - do { - lmdb::cursor_del(msgCursor); - } while (msgCursor.get(indexVal, val, MDB_PREV)); + if (!start) { + do { + lmdb::cursor_del(msgCursor); + } while (msgCursor.get(indexVal, val, MDB_PREV)); + } cursor.close(); msgCursor.close();