For documents without TOC we need to redraw current page after showing the "No Table of Contents" message,

otherwise the message "Retrieving TOC..." will stay on the screen indefinitely.
This commit is contained in:
Tigran Aivazian
2012-09-09 15:00:17 +01:00
parent 4c5f488151
commit f1e197cbfd

View File

@@ -1738,7 +1738,7 @@ function UniReader:showToc()
prev = k
prev_depth = self.toc[prev].depth
end -- for k,v in ipairs(self.toc)
if ( self.toc_children[0] ) then
if (self.toc_children[0]) then
self.toc_curidx_to_x = self.toc_children[0]
for i=1,#self.toc_children[0] do
table.insert(self.toc_cview, self.toc_xview[self.toc_children[0][i]])
@@ -1747,7 +1747,8 @@ function UniReader:showToc()
end
if #self.toc == 0 then
return showInfoMsgWithDelay("No Table of Contents", 1500, 1)
showInfoMsgWithDelay("No Table of Contents", 1500, 1)
return self:redrawCurrentPage()
end
self.toc_curitem = self:findTOCpos()