Skip to content

Commit 70f4a99

Browse files
committed
Fix attendee naming handling
optString returns "null" for null values, which makes "null" visible in the UI.
1 parent 8e07808 commit 70f4a99

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pretixscan/app/src/main/java/eu/pretix/pretixscan/droid/ui/MainActivity.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,12 @@ class MainActivity : AppCompatActivity(), ReloadableActivity, ScannerView.Result
10151015
} else {
10161016
values
10171017
}
1018-
val attendeeName = if (conf.hideNames) "" else res.position?.optString("attendee_name")
1018+
val attendeeName = if (conf.hideNames || res.position?.isNull("attendee_name") != false) {
1019+
""
1020+
} else {
1021+
res.position?.optString("attendee_name")
1022+
}
1023+
10191024
var attendeeDOB: String? = null
10201025
if (!conf.hideNames) {
10211026
val qlen = res.position?.getJSONArray("answers")?.length() ?: 0

0 commit comments

Comments
 (0)