From 1bfbef1ab5c2029e42b00763774a5ee3f55a2fad Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 27 Jul 2023 12:59:16 +0200 Subject: [PATCH] Previous code was `throw IllegalStateException()`, so keep the existing error, even if it should never happen, being compliant with `UseCheckOrError` detekt rule. --- .../io/element/android/libraries/maplibre/compose/MapboxMap.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt b/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt index 82b5e1c237..5af79e7524 100644 --- a/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt +++ b/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt @@ -236,7 +236,7 @@ private fun MapView.lifecycleObserver(previousState: MutableState { //handled in onDispose } - Lifecycle.Event.ON_ANY -> Unit + Lifecycle.Event.ON_ANY -> error("ON_ANY should never be used") } previousState.value = event }