Reset carInfo when our session is destroyed since data will be stale (#3754)

This commit is contained in:
Daniel Shokouhi 2023-08-04 07:55:00 -07:00 committed by GitHub
parent e274b7e15e
commit 56798849fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,11 @@ class HaCarAppService : CarAppService() {
}
}
override fun onDestroy() {
super.onDestroy()
carInfo = null
}
private fun loadEntities(scope: CoroutineScope, id: Int) {
allEntitiesJob?.cancel()
allEntitiesJob = scope.launch {