Jitsi widget: Manage "Back To App"

This commit is contained in:
manuroe
2017-08-11 14:18:10 +02:00
parent 8ef4495bf0
commit c52f7c85b2
6 changed files with 208 additions and 37 deletions
@@ -93,6 +93,16 @@ static const NSString *kJitsiServerUrl = @"https://jitsi.riot.im/";
[super didReceiveMemoryWarning];
}
#pragma mark - Actions
- (IBAction)onBackToAppButtonPressed:(id)sender
{
if (_delegate)
{
[_delegate jitsiViewController:self goBackToApp:nil];
}
}
#pragma mark - JitsiMeetViewDelegate
- (void)conferenceFailed:(NSDictionary *)data
@@ -104,8 +114,16 @@ static const NSString *kJitsiServerUrl = @"https://jitsi.riot.im/";
- (void)conferenceLeft:(NSDictionary *)data
{
// The conference is over. Close this view controller.
[self dismissViewControllerAnimated:YES completion:nil];
// The conference is over. Let the delegate close this view controller.
if (_delegate)
{
[_delegate jitsiViewController:self dismissViewJitsiController:nil];
}
else
{
// Do it ourself
[self dismissViewControllerAnimated:YES completion:nil];
}
}
@end