Ensure activitytracker updates get flushed to disk

This commit is contained in:
jpirnay
2026-05-23 09:55:58 +02:00
parent 39228b7631
commit f5dee12646
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ void ReadingSessionTracker::end() {
LOG_DBG("RST", "Session end doc=%s secs=%u pages=%u prog=%u wall=%lld", docId.c_str(), seconds,
pagesTurnedThisSession, lastKnownProgress, (long long)walltime);
if (seconds > 0 && !docId.empty()) {
if (!docId.empty()) {
READING_STATS.recordSession(docId, title, author, seconds, pagesTurnedThisSession, lastKnownProgress,
static_cast<time_t>(walltime));
if (!READING_STATS.saveToFile()) {