mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Jitsi widget: Fix occasional crash on hang up
Apparently, jitsi does not call delegate methods always on the same thread. Come back to the main thread for safety. https://github.com/matrix-org/riot-ios-rageshakes/issues/220
This commit is contained in:
@@ -132,16 +132,19 @@ static const NSString *kJitsiServerUrl = @"https://jitsi.riot.im/";
|
||||
|
||||
- (void)conferenceLeft:(NSDictionary *)data
|
||||
{
|
||||
// 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];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user