mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Sort documents - open sidecar file only in percent sort (#3622)
This commit is contained in:
@@ -65,11 +65,13 @@ function FileChooser:init()
|
||||
elseif attributes.mode == "file" then
|
||||
if self.file_filter == nil or self.file_filter(filename) then
|
||||
local percent_finished = 0
|
||||
if DocSettings:hasSidecarFile(filename) then
|
||||
local docinfo = DocSettings:open(filename)
|
||||
percent_finished = docinfo.data.percent_finished
|
||||
if percent_finished == nil then
|
||||
percent_finished = 0
|
||||
if self.collate == "percent_unopened_first" or self.collate == "percent_unopened_last" then
|
||||
if DocSettings:hasSidecarFile(filename) then
|
||||
local docinfo = DocSettings:open(filename)
|
||||
percent_finished = docinfo.data.percent_finished
|
||||
if percent_finished == nil then
|
||||
percent_finished = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
table.insert(files, {name = f,
|
||||
|
||||
Reference in New Issue
Block a user