mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Statistics: Add percentage completed to Statistics plugin
Makes percentage completed easily accessible through the statistics plugin. It has always been accessible through the status bar, but not through the statistics menu.
This commit is contained in:
committed by
Qingping Hou
parent
97d34c5bb0
commit
d33fee3a40
@@ -310,6 +310,7 @@ function ReaderStatistics:getCurrentStat()
|
||||
{ _("Total days"), total_days },
|
||||
{ _("Average time per page"), util.secondsToClock(avg_time_per_page, false) },
|
||||
{ _("Read pages/Total pages"), read_pages .. "/" .. self.data.pages },
|
||||
{ _("Percentage completed"), math.floor(read_pages / self.data.pages * 100 + 0.5) .. "%" }, -- adding 0.5 rounds to nearest integer with math.floor
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user