2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

Merge pull request #1942 from koreader/houqp-master

bookstatus(fix): reset self.stats on init
This commit is contained in:
Frans de Jonge 2016-04-06 08:16:59 +02:00
commit 62f07b505e

View File

@ -50,15 +50,15 @@ local BookStatusWidget = InputContainer:new{
status = "",
modified = "",
},
stats = {
total_time_in_sec = 0,
performance_in_pages = {},
pages = 0,
}
stats = nil
}
function BookStatusWidget:init()
self.stats.pages = self.document:getPageCount()
self.stats = {
total_time_in_sec = 0,
performance_in_pages = {},
pages = self.document:getPageCount(),
}
self:getStatisticsSettings()
if self.settings then
self.summary = self.settings:readSetting("summary")