Commit ec06b73d authored by Nate Graham's avatar Nate Graham
Browse files

Reviews: Don't check for name field being empty when it's not visible

Now, under certain circumstances, the name field will not be shown. But
the logic for ensuring all review data has been filled out was not
taking that into account, so it become impossible to submit a review
when the field was invisible because technically it was empty, so it
triggered the "Insert a name" condition.

This commit fixes that by disabling the name check when the name field
is invisible.

BUG: 460504
FIXED-IN: 5.26.1

(cherry picked from commit 8577309c)
parent d781102c
Pipeline #249749 passed with stage
in 59 seconds
......@@ -62,7 +62,7 @@ Kirigami.OverlaySheet
if (reviewInput.length === 0) return i18n("Write the review");
if (reviewInput.length < 15) return i18n("Keep writing…");
if (reviewInput.length > 3000) return i18n("Too long!");
if (nameInput.length < 1) return i18nc("@info:usagetip", "Insert a name");
if (nameInput.visible && nameInput.length < 1) return i18nc("@info:usagetip", "Insert a name");
return "";
wrapMode: Text.WordWrap
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment