|
|
|
@ -31,8 +31,6 @@
|
|
|
|
|
#define CELL_HEIGHT 72.0f
|
|
|
|
|
#define HEADER_HEIGHT 44.0f
|
|
|
|
|
|
|
|
|
|
// NSString *const SignalsViewControllerSegueShowIncomingCall = @"ShowIncomingCallSegue";
|
|
|
|
|
|
|
|
|
|
@interface SignalsViewController ()
|
|
|
|
|
|
|
|
|
|
@property (nonatomic) YapDatabaseConnection *editingDbConnection;
|
|
|
|
@ -196,11 +194,6 @@
|
|
|
|
|
[self registerForPreviewingWithDelegate:self sourceView:self.tableView];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// [[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
|
// selector:@selector(handleActiveCallNotification:)
|
|
|
|
|
// name:[CallService callServiceActiveCallNotificationName]
|
|
|
|
|
// object:nil];
|
|
|
|
|
//
|
|
|
|
|
[self updateBarButtonItems];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -260,31 +253,6 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//- (void)handleActiveCallNotification:(NSNotification *)notification
|
|
|
|
|
//{
|
|
|
|
|
// // TODO insteead at the callsite lets present as topmost VC
|
|
|
|
|
// AssertIsOnMainThread();
|
|
|
|
|
//
|
|
|
|
|
// if (![notification.object isKindOfClass:[SignalCall class]]) {
|
|
|
|
|
// DDLogError(@"%@ expected presentCall observer to be notified with a SignalCall, but found %@",
|
|
|
|
|
// self.tag,
|
|
|
|
|
// notification.object);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// SignalCall *call = (SignalCall *)notification.object;
|
|
|
|
|
//
|
|
|
|
|
// // Dismiss any other modals so we can present call modal.
|
|
|
|
|
// if (self.presentedViewController) {
|
|
|
|
|
// [self dismissViewControllerAnimated:YES
|
|
|
|
|
// completion:^{
|
|
|
|
|
// [self performSegueWithIdentifier:SignalsViewControllerSegueShowIncomingCall sender:call];
|
|
|
|
|
// }];
|
|
|
|
|
// } else {
|
|
|
|
|
// [self performSegueWithIdentifier:SignalsViewControllerSegueShowIncomingCall sender:call];
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
- (void)previewingContext:(id<UIViewControllerPreviewing>)previewingContext
|
|
|
|
|
commitViewController:(UIViewController *)viewControllerToCommit {
|
|
|
|
|
MessagesViewController *vc = (MessagesViewController *)viewControllerToCommit;
|
|
|
|
@ -726,28 +694,6 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#pragma mark - Navigation
|
|
|
|
|
|
|
|
|
|
//- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
|
|
|
|
// if ([segue.identifier isEqualToString:SignalsViewControllerSegueShowIncomingCall]) {
|
|
|
|
|
// DDLogDebug(@"%@ preparing for incoming call segue", self.tag);
|
|
|
|
|
// if (![segue.destinationViewController isKindOfClass:[OWSCallViewController class]]) {
|
|
|
|
|
// DDLogError(@"%@ Received unexpected destination view controller: %@", self.tag,
|
|
|
|
|
// segue.destinationViewController); return;
|
|
|
|
|
// }
|
|
|
|
|
// OWSCallViewController *callViewController = (OWSCallViewController *)segue.destinationViewController;
|
|
|
|
|
//
|
|
|
|
|
// if (![sender isKindOfClass:[SignalCall class]]) {
|
|
|
|
|
// DDLogError(@"%@ expecting call segueu to be sent by a SignalCall, but found: %@", self.tag, sender);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// SignalCall *call = (SignalCall *)sender;
|
|
|
|
|
// TSContactThread *thread = [TSContactThread getOrCreateThreadWithContactId:call.remotePhoneNumber];
|
|
|
|
|
// callViewController.thread = thread;
|
|
|
|
|
// callViewController.call = call;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
#pragma mark - IBAction
|
|
|
|
|
|
|
|
|
|
- (IBAction)selectedInbox:(id)sender {
|
|
|
|
|