Chargeprice: do not show two error messages if car was not yet selected

This commit is contained in:
johan12345
2021-04-28 22:38:56 +02:00
parent c8aa64fa7c
commit c9a0b270cd

View File

@@ -168,6 +168,7 @@ class ChargepriceFragment : DialogFragment() {
vm.chargePricesForChargepoint.observe(viewLifecycleOwner) { res ->
when (res?.status) {
Status.ERROR -> {
if (vm.vehicle.value == null) return@observe
connectionErrorSnackbar?.dismiss()
connectionErrorSnackbar = Snackbar
.make(