Sort documents - open sidecar file only in percent sort (#3622)

pull/3627/head
Robert 6 years ago committed by poire-z
parent 46e0f30b0a
commit dd00417bc8

@ -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,

Loading…
Cancel
Save