[issue-2610] fix NoSuchElement error

This commit is contained in:
Péter Radics 2021-01-03 21:42:33 +01:00
parent 7aaebd493b
commit 889a9a1798

View file

@ -108,7 +108,7 @@ class AppStateHandler @Inject constructor(
} }
.distinctUntilChanged() .distinctUntilChanged()
.subscribe { .subscribe {
val overrideColorSpecs = it?.first()?.content?.toModel<Map<String, String>>() val overrideColorSpecs = it?.firstOrNull()?.content?.toModel<Map<String, String>>()
matrixItemColorProvider.setOverrideColors(overrideColorSpecs) matrixItemColorProvider.setOverrideColors(overrideColorSpecs)
} }
.addTo(compositeDisposable) .addTo(compositeDisposable)