FileChooser: fix percent sorting (#10393)

reviewable/pr10398/r1
hius07 1 year ago committed by GitHub
parent b18ab634ab
commit 2ba694d394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -158,13 +158,13 @@ function FileChooser:getListItem(f, filename, attributes, collate)
}
if collate then -- file
if G_reader_settings:readSetting("show_file_in_bold") ~= false then
item.opened = DocSettings:hasSidecarFile(filename)
item.opened = DocSettings:hasSidecarFile(filename) and true or false
end
if collate == "type" then
item.suffix = util.getFileNameSuffix(f)
elseif collate == "percent_unopened_first" or collate == "percent_unopened_last" then
local percent_finished
item.opened = DocSettings:hasSidecarFile(filename)
item.opened = DocSettings:hasSidecarFile(filename) and true or false
if item.opened then
local doc_settings = DocSettings:open(filename)
percent_finished = doc_settings:readSetting("percent_finished")

Loading…
Cancel
Save