fix(stats): use local timezone for peak reading hours

Pass the user's timezone settings to the database query to ensure the
Reading Clock widget groups peak reading hours correctly, instead of
defaulting to UTC.

Also includes a minor UI update to the KOReader plugin to expose a
download options button when multiple formats are available.

Closes #513
This commit is contained in:
neon
2026-07-03 05:11:14 +00:00
parent 6fdd2569e1
commit 68134a9f85
5 changed files with 54 additions and 9 deletions
@@ -1781,6 +1781,14 @@ function BookOrbitCatalog:showBookActionSheet(detail, opts)
UIManager:close(dialog)
callback()
end
local download_options_button = #supported_files > 0 and {
text = _("Download options"),
callback = function()
closeThen(function()
self:showDownloadOptions(detail)
end)
end,
} or nil
if include_details or allow_select then
local details_button = include_details and {
@@ -1841,6 +1849,10 @@ function BookOrbitCatalog:showBookActionSheet(detail, opts)
end
end
if download_options_button then
addRow(download_options_button)
end
addRow({
text = _("Set read status"),
callback = function()
@@ -2917,11 +2929,7 @@ function BookOrbitCatalog:buildDetailHeader(detail, width, height)
enabled = #supported_files > 0,
text_font_size = 16,
callback = function()
if #supported_files == 1 then
self:downloadDefaultFile(detail, supported_files[1])
else
self:showFileChoices(detail)
end
self:showDownloadOptions(detail)
end,
}
table.insert(buttons_row, self.detail_download_button)