From 88373369223620ce0f8369ef0cf3ceeb77d852ec Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:45:18 +0300 Subject: [PATCH] Statistics: AnnotationsModified event naming --- plugins/statistics.koplugin/main.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/statistics.koplugin/main.lua b/plugins/statistics.koplugin/main.lua index c519bc5b4..5f21d483d 100644 --- a/plugins/statistics.koplugin/main.lua +++ b/plugins/statistics.koplugin/main.lua @@ -2727,13 +2727,13 @@ function ReaderStatistics:onCloseDocument() self:insertDB() end -function ReaderStatistics:onAnnotationsModified(diff) +function ReaderStatistics:onAnnotationsModified(annotations) if self.settings.is_enabled then - if diff.highlights then - self.data.highlights = self.data.highlights + diff.highlights + if annotations.nb_highlights_added then + self.data.highlights = self.data.highlights + annotations.nb_highlights_added end - if diff.notes then - self.data.notes = self.data.notes + diff.notes + if annotations.nb_notes_added then + self.data.notes = self.data.notes + annotations.nb_notes_added end end end