Update filechooser.lua

adds instruction for files labeled "on hold" to sorting function
reviewable/pr11524/r1
SomeGuy 2 months ago committed by GitHub
parent dd8560cef8
commit a6243e334e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -207,7 +207,7 @@ local FileChooser = Menu:extend{
end,
},
percent_natural = {
-- sort 90% > 50% > 0% > unopened > 100% or finished
-- sort 90% > 50% > 0% or on hold > unopened > 100% or finished
text = _("percent - unopened - finished last"),
menu_order = 90,
can_collate_mixed = false,
@ -241,6 +241,12 @@ local FileChooser = Menu:extend{
return
end
-- books marked as "on hold" should be considered the same as 0%
if summary and summary.status == "abandoned" then
item.percent_finished = 0.0
return
end
percent_finished = doc_settings:readSetting("percent_finished")
end
-- smooth 2 decimal points (0.00) instead of 16 decimal numbers

Loading…
Cancel
Save