From 889a9a17983a4241a285d3d12aeee1e6fb7a4d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Sun, 3 Jan 2021 21:42:33 +0100 Subject: [PATCH] [issue-2610] fix NoSuchElement error --- vector/src/main/java/im/vector/app/AppStateHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/AppStateHandler.kt b/vector/src/main/java/im/vector/app/AppStateHandler.kt index b2791c0978..303433db67 100644 --- a/vector/src/main/java/im/vector/app/AppStateHandler.kt +++ b/vector/src/main/java/im/vector/app/AppStateHandler.kt @@ -108,7 +108,7 @@ class AppStateHandler @Inject constructor( } .distinctUntilChanged() .subscribe { - val overrideColorSpecs = it?.first()?.content?.toModel>() + val overrideColorSpecs = it?.firstOrNull()?.content?.toModel>() matrixItemColorProvider.setOverrideColors(overrideColorSpecs) } .addTo(compositeDisposable)