From 44b13ef82bbac60fd80ee3facbacea3260399197 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 12 Feb 2026 18:17:13 +0100 Subject: [PATCH] Fix quality issue --- .../android/features/call/impl/utils/ActiveCallManager.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt index e85b101112..a6663943bd 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt @@ -74,6 +74,7 @@ interface ActiveCallManager { /** * Called to hang up the active call. It will hang up the call and remove any existing UI and the active call. * @param callType The type of call that the user hangs up, either an external url one or a room one. + * @param notificationData The data for the incoming call notification. */ suspend fun hangUpCall( callType: CallType, @@ -204,15 +205,13 @@ class DefaultActiveCallManager( val currentActiveCall = activeCall.value ?: run { // activeCall.value can be null if the application has been killed while the call was ringing // Build a currentActiveCall with the provided parameters. - if (notificationData != null) { + notificationData?.let { ActiveCall( callType = callType, callState = CallState.Ringing( notificationData = notificationData, ) ) - } else { - null } } ?: run { Timber.tag(tag).w("No active call, ignoring hang up")