Book status: reset rating (#15227)

This commit is contained in:
hius07 authored and GitHub committed 2026-04-04 17:43:10 +03:00
1 parent bd1c3c63d9
commit 8e8ca98c37
2 files changed
+4 -3

No files matched your search

@@ -714,7 +714,7 @@ function BookInfo:editSummary(doc_settings_or_file, book_props)
UIManager:close(input_dialog)
local note = input_dialog:getInputText()
summary.note = note ~= "" and note or nil
summary.rating = (i == 1 and summary.rating == 1) and 0 or i
summary.rating = (i ~= 1 or summary.rating ~= 1) and i or nil
doc_settings_or_file = filemanagerutil.saveSummary(doc_settings_or_file, summary)
self.summary_updated = true
self.kvp_widget:onClose()
+3 -2
View File
@@ -218,7 +218,7 @@ function BookStatusWidget:setStar(num)
local row = {}
if num then
num = (num == 1 and self.summary.rating == 1) and 0 or num
self.summary.rating = num
self.summary.rating = num ~= 0 and num or nil
self.updated = true
for i = 1, num do
@@ -575,9 +575,10 @@ function BookStatusWidget:openReviewDialog()
is_enter_default = true,
callback = function()
local note = self.note_dialog:getInputText()
note = note ~= "" and note or nil
self.summary.note = note
if self.note_widget then
self.note_widget:setText(note ~= "" and note or _("A few words about the book"))
self.note_widget:setText(note or _("A few words about the book"))
end
self.updated = true
self:closeInputDialog()