|
|
|
@ -38,7 +38,6 @@ local ReaderFooter = InputContainer:new{
|
|
|
|
|
pageno = nil,
|
|
|
|
|
pages = nil,
|
|
|
|
|
toc_level = 0,
|
|
|
|
|
max_ticks = 100,
|
|
|
|
|
progress_percentage = 0.0,
|
|
|
|
|
progress_text = nil,
|
|
|
|
|
text_font_face = "ffont",
|
|
|
|
@ -327,9 +326,7 @@ function ReaderFooter:_updateFooterText()
|
|
|
|
|
local max_level = self.ui.toc:getMaxDepth()
|
|
|
|
|
for i = 0, -max_level, -1 do
|
|
|
|
|
local ticks = self.ui.toc:getTocTicks(i)
|
|
|
|
|
if #ticks < self.max_ticks then
|
|
|
|
|
table.insert(ticks_candidates, ticks)
|
|
|
|
|
end
|
|
|
|
|
table.insert(ticks_candidates, ticks)
|
|
|
|
|
end
|
|
|
|
|
-- find the finest toc ticks by sorting out the largest one
|
|
|
|
|
table.sort(ticks_candidates, function(a, b) return #a > #b end)
|
|
|
|
|