ChargepriceFragment: fix nullability issue in observer

This commit is contained in:
johan12345
2023-06-06 18:53:55 +02:00
parent 20400b630a
commit 69ca8723a5
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ class ChargepriceFragment : Fragment() {
val connectorsAdapter = CheckableConnectorAdapter()
val observer: Observer<Chargepoint> = Observer {
val observer: Observer<Chargepoint?> = Observer {
connectorsAdapter.setCheckedItem(it)
}
vm.chargepoint.observe(viewLifecycleOwner, observer)

View File

@@ -30,7 +30,7 @@ class ChargepriceViewModel(
state.getLiveData("charger")
}
val chargepoint: MutableLiveData<Chargepoint> by lazy {
val chargepoint: MutableLiveData<Chargepoint?> by lazy {
state.getLiveData("chargepoint")
}