refs #3520 feat:silex→salix

This commit is contained in:
Sergio De la torre 2024-04-23 08:02:54 +02:00
parent afc9488f76
commit 7ccd79affb
1 changed files with 19 additions and 23 deletions

View File

@ -5,7 +5,6 @@ import android.view.inputmethod.EditorInfo
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentItemshelvinglogBinding
import es.verdnatura.domain.notNull
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.view.component.CustomDialog
@ -36,7 +35,6 @@ class ItemShelvingLogFragment(
super.init()
}
override fun onAttach(context: Context) {
if (context is OnPasillerosItemClickListener) pasillerosItemClickListener = context
super.onAttach(context)
@ -69,29 +67,27 @@ class ItemShelvingLogFragment(
override fun observeViewModel() {
with(viewModel) {
loadItemShelvingLogList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
itemShelvingLogList.observe(viewLifecycleOwner) {
if (it.list.isEmpty()) {
customDialog.setTitle(getString(R.string.noResults))
.setDescription(getString(R.string.noDataLabelScanned))
.setOkButton(getString(R.string.close)) {
customDialog.dismiss()
}.show()
} else {
adapter = ItemShelvingLogAdapter(
it.list,
onPasillerosItemClickListener = pasillerosItemClickListener!!
if (it.list.isEmpty()) {
customDialog.setTitle(getString(R.string.noResults))
.setDescription(getString(R.string.noDataLabelScanned))
.setOkButton(getString(R.string.close)) {
customDialog.dismiss()
}.show()
} else {
adapter = ItemShelvingLogAdapter(
it.list,
onPasillerosItemClickListener = pasillerosItemClickListener!!
)
binding.itemshelvinglogRecyclerview.adapter = adapter
binding.itemshelvinglogRecyclerview.layoutManager =
LinearLayoutManager(
requireContext(),
LinearLayoutManager.VERTICAL,
false
)
binding.itemshelvinglogRecyclerview.adapter = adapter
binding.itemshelvinglogRecyclerview.layoutManager =
LinearLayoutManager(
requireContext(),
LinearLayoutManager.VERTICAL,
false
)
setToolBar(getString(R.string.itemShelvingLog) + ":" + itemScan)
}
setToolBar(getString(R.string.itemShelvingLog) + ":" + itemScan)
}
}
}