Only collect the entity flow if we are not null (#2156)

* Only collect the entity flow if we are not null

* Use safe call instead of null check
This commit is contained in:
Daniel Shokouhi 2022-01-18 13:42:23 -08:00 committed by GitHub
parent 69ccb1ef34
commit c09fa8d2a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,7 @@ abstract class BaseWidgetProvider : AppWidgetProvider() {
updateAllWidgets(context)
if (getAllWidgetIds(context).isNotEmpty()) {
entityUpdates = integrationUseCase.getEntityUpdates()
entityUpdates!!.collect {
entityUpdates?.collect {
onEntityStateChanged(context, it)
}
}