mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Remove Jitsi widget info from activities view
This commit is contained in:
@@ -4442,101 +4442,6 @@ NSNotificationName const RoomViewControllerViewDidDisappearNotification = @"Room
|
||||
}
|
||||
}];
|
||||
}
|
||||
else if (customizedRoomDataSource.roomState.isOngoingConferenceCall)
|
||||
{
|
||||
// Show the "Ongoing conference call" banner only if the user is not in the conference
|
||||
MXCall *callInRoom = [self.roomDataSource.mxSession.callManager callInRoom:self.roomDataSource.roomId];
|
||||
if (callInRoom && callInRoom.state != MXCallStateEnded)
|
||||
{
|
||||
if ([self checkUnsentMessages] == NO)
|
||||
{
|
||||
[self refreshTypingNotification];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self.activitiesViewExpanded = YES;
|
||||
[roomActivitiesView displayOngoingConferenceCall:^(BOOL video) {
|
||||
|
||||
NSLog(@"[RoomVC] onOngoingConferenceCallPressed");
|
||||
|
||||
// Make sure there is not yet a call
|
||||
if (![customizedRoomDataSource.mxSession.callManager callInRoom:customizedRoomDataSource.roomId])
|
||||
{
|
||||
[customizedRoomDataSource.room placeCallWithVideo:video success:nil failure:nil];
|
||||
}
|
||||
} onClosePressed:nil];
|
||||
}
|
||||
}
|
||||
else if (jitsiWidget)
|
||||
{
|
||||
// The room has an active jitsi widget
|
||||
// Show it in the banner if the user is not already in
|
||||
LegacyAppDelegate *appDelegate = [AppDelegate theDelegate];
|
||||
if ([appDelegate.callPresenter.jitsiVC.widget.widgetId isEqualToString:jitsiWidget.widgetId])
|
||||
{
|
||||
if ([self checkUnsentMessages] == NO)
|
||||
{
|
||||
[self refreshTypingNotification];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self.activitiesViewExpanded = YES;
|
||||
[roomActivitiesView displayOngoingConferenceCall:^(BOOL video) {
|
||||
|
||||
NSLog(@"[RoomVC] onOngoingConferenceCallPressed (jitsi)");
|
||||
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
NSString *appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
|
||||
|
||||
// Check app permissions first
|
||||
[MXKTools checkAccessForCall:video
|
||||
manualChangeMessageForAudio:[NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"microphone_access_not_granted_for_call"], appDisplayName]
|
||||
manualChangeMessageForVideo:[NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"camera_access_not_granted_for_call"], appDisplayName]
|
||||
showPopUpInViewController:self completionHandler:^(BOOL granted) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
if (granted)
|
||||
{
|
||||
// Present the Jitsi view controller
|
||||
[appDelegate.callPresenter displayJitsiCallWithWidget:jitsiWidget];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"[RoomVC] onOngoingConferenceCallPressed: Warning: The application does not have the perssion to join the call");
|
||||
}
|
||||
}
|
||||
}];
|
||||
} onClosePressed:^{
|
||||
|
||||
[self startActivityIndicator];
|
||||
|
||||
// Close the widget
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
[[WidgetManager sharedManager] closeWidget:jitsiWidget.widgetId inRoom:self.roomDataSource.room success:^{
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
[self stopActivityIndicator];
|
||||
|
||||
// The banner will automatically leave thanks to kWidgetManagerDidUpdateWidgetNotification
|
||||
}
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
|
||||
[self showJitsiErrorAsAlert:error];
|
||||
[self stopActivityIndicator];
|
||||
}
|
||||
}];
|
||||
}];
|
||||
}
|
||||
}
|
||||
else if ([self checkUnsentMessages] == NO)
|
||||
{
|
||||
// Show "scroll to bottom" icon when the most recent message is not visible,
|
||||
|
||||
Reference in New Issue
Block a user