Jitsi widget: Display the hangup button when we are back-to-app

This commit is contained in:
manuroe
2017-08-11 14:59:05 +02:00
parent 1bdbe40c09
commit 0e3a8a9ce8
4 changed files with 30 additions and 2 deletions
+11 -2
View File
@@ -1211,9 +1211,11 @@
userPictureView.clipsToBounds = YES;
}
// Show the hangup button if there is an active call in the current room
// Show the hangup button if there is an active call or an active jitsi
// conference call in the current room
MXCall *callInRoom = [self.roomDataSource.mxSession.callManager callInRoom:self.roomDataSource.roomId];
if (callInRoom && callInRoom.state != MXCallStateEnded)
if ((callInRoom && callInRoom.state != MXCallStateEnded)
|| [[AppDelegate theDelegate].jitsiViewController.widget.roomId isEqualToString:self.roomDataSource.roomId])
{
roomInputToolbarView.activeCall = YES;
}
@@ -2713,6 +2715,13 @@
{
[callInRoom hangup];
}
else if ([[AppDelegate theDelegate].jitsiViewController.widget.roomId isEqualToString:self.roomDataSource.roomId])
{
[[AppDelegate theDelegate].jitsiViewController hangup];
}
[self refreshActivitiesViewDisplay];
[self refreshRoomInputToolbar];
}
- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView heightDidChanged:(CGFloat)height completion:(void (^)(BOOL finished))completion