mirror of
https://github.com/ev-map/EVMap.git
synced 2026-05-24 23:06:15 -04:00
fix NPE?
This commit is contained in:
@@ -148,13 +148,13 @@ class MapViewModel(application: Application, private val state: SavedStateHandle
|
||||
MutableLiveData<Set<Long>>()
|
||||
}
|
||||
|
||||
val chargerSparse: MutableLiveData<ChargeLocation?> by lazy {
|
||||
val chargerSparse: MutableLiveData<ChargeLocation?> =
|
||||
state.getLiveData<ChargeLocation?>("chargerSparse").apply {
|
||||
observeForever {
|
||||
selectedChargepoint.value = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val triggerChargerDetailsRefresh = MutableLiveData(false)
|
||||
val chargerDetails: LiveData<Resource<ChargeLocation>> = chargerSparse.switchMap { charger ->
|
||||
triggerChargerDetailsRefresh.value = false
|
||||
|
||||
Reference in New Issue
Block a user