refs #5313 fix:crashlytics errors

This commit is contained in:
Sergio De la torre 2023-11-09 15:56:59 +01:00
parent 19761526c1
commit 6661a3dfdc
1 changed files with 12 additions and 7 deletions

View File

@ -184,13 +184,18 @@ class CollectionShowTicketFragment(
binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {//ID=0 ACTION_NEXT ID=5 ACTION_UNESPECEFIED)
if (!binding.scanInput.text.toString().isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
binding.scanInput.text.toString().toInt(),
getDataInt(SECTORFK),
print = "0",
type
)
try{
viewModel.collectionTicketGet(
binding.scanInput.text.toString().toInt(),
getDataInt(SECTORFK),
print = "0",
type
)
binding.splashProgress.visibility = VISIBLE
}catch (ex:Exception){
getString(R.string.scanLabelTicket).toast(requireContext())
}
}