Skip to content

Commit

Permalink
Allow to skip questions during check-in (#84)
Browse files Browse the repository at this point in the history
* Allow to skip questions during check-in

* Update subrepo
  • Loading branch information
raphaelm authored Feb 14, 2024
1 parent b0bca8a commit 68b604c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ class AppConfig(ctx: Context) : ConfigStore {
val hideNames: Boolean
get() = default_prefs.getBoolean(PREFS_KEY_HIDE_NAMES, false)

val ignoreQuestions: Boolean
get() = default_prefs.getBoolean(PREFS_KEY_IGNORE_QUESTIONS, false)

var sounds: Boolean
get() = default_prefs.getBoolean(PREFS_KEY_SOUNDS, true)
set(value) = default_prefs.edit().putBoolean(PREFS_KEY_SOUNDS, value).apply()
Expand Down Expand Up @@ -430,6 +433,7 @@ class AppConfig(ctx: Context) : ConfigStore {
val PREFS_KEY_PRINTBADGESTWICE = "pref_print_badges_twice"
val PREFS_KEY_AUTOPRINTBADGES = "pref_auto_print_badges"
val PREFS_KEY_UNPAID_ASK = "pref_unpaid_ask"
val PREFS_KEY_IGNORE_QUESTIONS = "pref_ignore_questions"
val PREFS_KEY_SCAN_TYPE = "pref_scan_type"
val PREFS_KEY_SOUNDS = "pref_sounds"
val PREFS_KEY_HIDE_NAMES = "pref_hide_names"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ class MainActivity : AppCompatActivity(), ReloadableActivity, ZXingScannerView.R
checkResult = provider.check(conf.eventSelectionToMap(), result, "barcode", answers, ignore_unpaid, conf.printBadges, when (conf.scanType) {
"exit" -> TicketCheckProvider.CheckInType.EXIT
else -> TicketCheckProvider.CheckInType.ENTRY
})
}, allowQuestions = !conf.ignoreQuestions)
if (provider is OnlineCheckProvider) {
if (checkResult?.type == TicketCheckProvider.CheckResult.Type.ERROR) {
(application as PretixScan).connectivityHelper.recordError()
Expand Down
1 change: 1 addition & 0 deletions pretixscan/app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<string name="settings_label_badges">Badges</string>
<string name="preference_badges_twice">Jedes Badge doppelt drucken</string>
<string name="pref_unpaid_ask">Abfrage beim Check-in unbezahlter Bestellungen</string>
<string name="pref_ignore_questions">Keine Fragen beim Check-in stellen</string>
<string name="pref_unpaid_ask_summary">Wenn die Check-in-Liste unbezahlte Bestellungen enthält, steuert diese Einstellung ob vor dem Einchecken dieser ein Bestätigungsdialog erscheint.</string>
<string name="already_scanned">bereits gescannt</string>
<string name="total_tickets_sold">Tickets (gesamt)</string>
Expand Down
1 change: 1 addition & 0 deletions pretixscan/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<string name="preference_badges_twice">Print every badge twice</string>
<string name="settings_label_details">Details</string>
<string name="pref_unpaid_ask">Ask before checking in unpaid tickets</string>
<string name="pref_ignore_questions">Do not ask questions during check-in</string>
<string name="pref_unpaid_ask_summary">When the check-in list is set to include pending orders, this setting controls whether you will be asked before they are being checked in.</string>
<string name="question_validation_error">Some of your input could not be validated.</string>
<string name="question_input_required">This field is required.</string>
Expand Down
4 changes: 4 additions & 0 deletions pretixscan/app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
android:key="pref_unpaid_ask"
android:summary="@string/pref_unpaid_ask_summary"
android:title="@string/pref_unpaid_ask" />
<CheckBoxPreference
android:defaultValue="false"
android:key="pref_ignore_questions"
android:title="@string/pref_ignore_questions" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_label_covid_check">
<CheckBoxPreference
Expand Down

0 comments on commit 68b604c

Please sign in to comment.