Skip to content

Commit

Permalink
Add basic support for question type barcode
Browse files Browse the repository at this point in the history
  • Loading branch information
robbi5 committed Sep 17, 2024
1 parent 840e5c5 commit fd8c929
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,11 @@ class MainActivity : AppCompatActivity(), ReloadableActivity, ScannerView.Result

if (dialog?.isShowing() == true) {
/*
* Skip scan if a dialog is still in front. This forces users to answer the questions asked.
* Skip scan if a dialog is still in front.
* This forces users to answer the questions asked.
* The scan data is passed to the dialog, maybe it wants to fill a field with it.
*/
dialog!!.handleScan(raw_result)
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class UnpaidDialog(ctx: Activity, val secret: String, val answers: MutableList<A
override fun handleActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Boolean {
return false
}
override fun handleScan(rawResult: String) {
// ignore scan
}
}

fun showUnpaidDialog(ctx: Activity, res: TicketCheckProvider.CheckResult,
Expand Down

0 comments on commit fd8c929

Please sign in to comment.