Jitsi widget: RoomVC: Show it in the banner when there is an active jitsi conference in a room.

This commit is contained in:
manuroe
2017-08-04 13:47:50 +02:00
parent 9aa2ddffde
commit 93f9458760
5 changed files with 102 additions and 0 deletions
+25
View File
@@ -47,6 +47,8 @@
#import "ReadReceiptsViewController.h"
#import "JitsiViewController.h"
#import "RoomEmptyBubbleCell.h"
#import "RoomIncomingTextMsgBubbleCell.h"
@@ -96,6 +98,7 @@
#import "AvatarGenerator.h"
#import "Tools.h"
#import "WidgetManager.h"
#import "GBDeviceInfo_iOS.h"
@@ -3275,6 +3278,8 @@
{
[roomActivitiesView removeGestureRecognizer:roomActivitiesView.gestureRecognizers[0]];
}
Widget *jitsiWidget = [customizedRoomDataSource jitsiWidget];
if ([AppDelegate theDelegate].isOffline)
{
@@ -3305,6 +3310,26 @@
}];
}
}
else if (jitsiWidget)
{
// The room has an active jitsi widget, show it in the banner
[roomActivitiesView displayOngoingJitsiConference:^{
// Present the Jitsi view controller
AppDelegate *appDelegate = [AppDelegate theDelegate];
JitsiViewController *jitsiViewController = [JitsiViewController jitsiViewControllerForWidget:jitsiWidget];
if (appDelegate.window.rootViewController.presentedViewController)
{
[appDelegate.window.rootViewController.presentedViewController presentViewController:jitsiViewController animated:YES completion:nil];
}
else
{
[appDelegate.window.rootViewController presentViewController:jitsiViewController animated:YES completion:nil];
}
}];
}
else if ([self checkUnsentMessages] == NO)
{
// Show "scroll to bottom" icon when the most recent message is not visible,