error interface
This commit is contained in:
parent
97b9a31f8e
commit
7e0cdda6aa
|
@ -7,6 +7,7 @@ import androidx.lifecycle.Observer
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentBufferLoadexpeditionBinding
|
import es.verdnatura.databinding.FragmentBufferLoadexpeditionBinding
|
||||||
|
import es.verdnatura.domain.toast
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.OnSmartTagRowClickListener
|
import es.verdnatura.presentation.common.OnSmartTagRowClickListener
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||||
|
@ -93,10 +94,11 @@ class BufferLoadFragment(
|
||||||
|
|
||||||
it.response?.let { it1 -> ma.messageWithSound(it1, false, true) }
|
it.response?.let { it1 -> ma.messageWithSound(it1, false, true) }
|
||||||
} else {
|
} else {
|
||||||
ma.messageWithSound(it.response,isError = true,true)
|
ma.messageWithSound(it.response, isError = true, true)
|
||||||
}
|
}
|
||||||
listTags.clear()
|
listTags.clear()
|
||||||
tagsAdapter!!.notifyDataSetChanged()
|
tagsAdapter!!.notifyDataSetChanged()
|
||||||
|
customDialogList.dismiss()
|
||||||
showExpeditionOrBufferScan()
|
showExpeditionOrBufferScan()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -137,8 +139,11 @@ class BufferLoadFragment(
|
||||||
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||||
if (!customDialogList.getValue().isNullOrEmpty()) {
|
if (!customDialogList.getValue().isNullOrEmpty()) {
|
||||||
|
try {
|
||||||
checkLoadExpedition(customDialogList.getValue().toInt())
|
checkLoadExpedition(customDialogList.getValue().toInt())
|
||||||
|
} catch (ex: Exception) {
|
||||||
|
ex.message!!.toast(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
customDialogList.setValue("")
|
customDialogList.setValue("")
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
|
Loading…
Reference in New Issue