From 35cebfca7d1b41278dbf89f0a8343ab5c6dd247c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 14 Nov 2025 09:24:41 +0100 Subject: [PATCH] No need to use apply setContentText accept null parameter. --- .../impl/notifications/RingingCallNotificationCreator.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt index 88ddddf0cf..e7d270ef8e 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt @@ -133,12 +133,8 @@ class RingingCallNotificationCreator( .setWhen(timestamp) .setOngoing(true) .setShowWhen(false) - .apply { - if (textContent != null) { - setContentText(textContent) - // Else the content text is set by the style (will be "Incoming call") - } - } + // If textContent is null, the content text is set by the style (will be "Incoming call") + .setContentText(textContent) .setSound(Settings.System.DEFAULT_RINGTONE_URI, AudioManager.STREAM_RING) .setTimeoutAfter(ElementCallConfig.RINGING_CALL_DURATION_SECONDS.seconds.inWholeMilliseconds) .setContentIntent(answerIntent)