mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
FileManagerHistory: fix loop error
This commit is contained in:
committed by
Qingping Hou
parent
2c80ff7d7b
commit
827e77afbe
@@ -47,6 +47,11 @@ function ReadHistory:_indexing(start)
|
||||
end
|
||||
|
||||
function ReadHistory:_sort()
|
||||
for i = #self.hist, 1, -1 do
|
||||
if self.hist[i].file == nil then
|
||||
table.remove(self.hist, i)
|
||||
end
|
||||
end
|
||||
table.sort(self.hist, fileFirstOrdering)
|
||||
-- TODO(zijiehe): Use binary insert instead of a loop to deduplicate.
|
||||
for i = #self.hist, 2, -1 do
|
||||
|
||||
Reference in New Issue
Block a user