diff --git a/Riot/Managers/Widgets/WidgetManager.m b/Riot/Managers/Widgets/WidgetManager.m index 3595eb4df5..bfd6159086 100644 --- a/Riot/Managers/Widgets/WidgetManager.m +++ b/Riot/Managers/Widgets/WidgetManager.m @@ -412,6 +412,10 @@ - (void)addMatrixSession:(MXSession *)mxSession // Broadcast the generic notification [[NSNotificationCenter defaultCenter] postNotificationName:kWidgetManagerDidUpdateWidgetNotification object:widget]; + // End jitsi call if a active call exists and widget has been updated to not be active + if ([[AppDelegate theDelegate].callPresenter.jitsiVC.widget.widgetId isEqualToString: widget.widgetId] && !widget.isActive) { + [[AppDelegate theDelegate].callPresenter endActiveJitsiCall]; + } } else { diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 7eba39cc92..b5d5f56650 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -5947,10 +5947,6 @@ - (void)listenWidgetNotifications [self refreshRoomTitle]; // Remove Jitsi widget view update [self refreshRemoveJitsiWidgetView]; - // End call if the widget is removed - if ([self isRoomHavingAJitsiCall]) { - [self endActiveJitsiCall]; - } } }]; }