Update filechooser.lua

tidy-up
reviewable/pr11524/r2
SomeGuy 3 months ago committed by GitHub
parent a6243e334e
commit 518b648c42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -235,18 +235,14 @@ local FileChooser = Menu:extend{
local doc_settings = DocSettings:open(item.path) local doc_settings = DocSettings:open(item.path)
local summary = doc_settings:readSetting("summary") local summary = doc_settings:readSetting("summary")
-- books marked as "finished" should be considered the same as 100% -- books marked as "finished" or "on hold" should be considered the same as 100% and 0% respectively
if summary and summary.status == "complete" then if summary and summary.status == "complete" then
item.percent_finished = 1.0 item.percent_finished = 1
return return
end elseif summary and summary.status == "abandoned" then
item.percent_finished = 0
-- 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 return
end end
percent_finished = doc_settings:readSetting("percent_finished") percent_finished = doc_settings:readSetting("percent_finished")
end end
-- smooth 2 decimal points (0.00) instead of 16 decimal numbers -- smooth 2 decimal points (0.00) instead of 16 decimal numbers

Loading…
Cancel
Save