From a9091c6ea6da9add11be4960f2fb6c56d92a5bda Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 16 Oct 2024 09:28:06 +0200 Subject: [PATCH] Set Active call immediately when not in widget mode. --- .../android/features/call/impl/ui/ElementCallActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt index 63aae37e8f..f36565556e 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt @@ -103,8 +103,9 @@ class ElementCallActivity : ElementThemeApp(appPreferencesStore) { val state = presenter.present() eventSink = state.eventSink - LaunchedEffect(state.isCallActive) { - if (state.isCallActive) { + LaunchedEffect(state.isCallActive, state.isInWidgetMode) { + // Note when not in WidgetMode, isCallActive will never be true, so consider the call is active + if (state.isCallActive || !state.isInWidgetMode) { setCallIsActive() } }