From 799275d3a3b054926a40d42f2b7dc1e1db990e14 Mon Sep 17 00:00:00 2001 From: David <97603719+Commodore64user@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:19:25 +0100 Subject: [PATCH] FileChooser: 0% > 'on hold' (#12037) --- frontend/ui/widget/filechooser.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/ui/widget/filechooser.lua b/frontend/ui/widget/filechooser.lua index 48e1c862b..04c1fdeab 100644 --- a/frontend/ui/widget/filechooser.lua +++ b/frontend/ui/widget/filechooser.lua @@ -212,7 +212,7 @@ local FileChooser = Menu:extend{ end, }, percent_natural = { - -- sort 90% > 50% > 0% or on hold > unopened > 100% or finished + -- sort 90% > 50% > 0% > on hold > unopened > 100% or finished text = _("percent – unopened – finished last"), menu_order = 90, can_collate_mixed = false, @@ -241,11 +241,11 @@ local FileChooser = Menu:extend{ local doc_settings = DocSettings:open(item.path) local summary = doc_settings:readSetting("summary") - -- books marked as "finished" or "on hold" should be considered the same as 100% and 0% respectively + -- books marked as "finished" or "on hold" should be considered the same as 100% and less than 0% respectively if summary and summary.status == "complete" then sort_percent = 1.0 elseif summary and summary.status == "abandoned" then - sort_percent = 0 + sort_percent = -0.01 end percent_finished = doc_settings:readSetting("percent_finished")