|
|
@ -2221,19 +2221,23 @@ function ReaderStatistics:onCloseDocument()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function ReaderStatistics:onAddHighlight()
|
|
|
|
function ReaderStatistics:onAddHighlight()
|
|
|
|
self.data.highlights = self.data.highlights + 1
|
|
|
|
if self.is_enabled then
|
|
|
|
return true
|
|
|
|
self.data.highlights = self.data.highlights + 1
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function ReaderStatistics:onDelHighlight()
|
|
|
|
function ReaderStatistics:onDelHighlight()
|
|
|
|
if self.data.highlights > 0 then
|
|
|
|
if self.is_enabled then
|
|
|
|
self.data.highlights = self.data.highlights - 1
|
|
|
|
if self.data.highlights > 0 then
|
|
|
|
|
|
|
|
self.data.highlights = self.data.highlights - 1
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return true
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function ReaderStatistics:onAddNote()
|
|
|
|
function ReaderStatistics:onAddNote()
|
|
|
|
self.data.notes = self.data.notes + 1
|
|
|
|
if self.is_enabled then
|
|
|
|
|
|
|
|
self.data.notes = self.data.notes + 1
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Triggered by auto_save_settings_interval_minutes
|
|
|
|
-- Triggered by auto_save_settings_interval_minutes
|
|
|
|