mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
FileChooser: fix percent sorting (#10393)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user