mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Don’t dismiss call view controller to present other view.
// FREEBIE
This commit is contained in:
parent
791e270578
commit
138301975c
|
@ -728,6 +728,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
keyboardOnViewAppearing:(BOOL)keyboardOnViewAppearing
|
||||
callOnViewAppearing:(BOOL)callOnViewAppearing
|
||||
{
|
||||
// TODO: Do this synchronously if we're already on the main thread.
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
MessagesViewController *mvc = [[MessagesViewController alloc] initWithNibName:@"MessagesViewController"
|
||||
bundle:nil];
|
||||
|
@ -736,11 +737,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
callOnViewAppearing:callOnViewAppearing];
|
||||
self.lastThread = thread;
|
||||
|
||||
if (self.presentedViewController) {
|
||||
[self.presentedViewController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
[self.navigationController pushViewController:mvc animated:YES];
|
||||
[self pushTopLevelViewController:mvc animateDismissal:YES animatePresentation:YES];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -799,6 +796,10 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
// Perform the first step.
|
||||
if (self.presentedViewController) {
|
||||
if ([self.presentedViewController isKindOfClass:[CallViewController class]]) {
|
||||
OWSProdInfo(@"error_could_not_present_view_due_to_call");
|
||||
return;
|
||||
}
|
||||
[self.presentedViewController dismissViewControllerAnimated:animateDismissal completion:dismissNavigationBlock];
|
||||
} else {
|
||||
dismissNavigationBlock();
|
||||
|
|
Loading…
Reference in a new issue