cleanup ahead of PR

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent ff93732ed7
commit 36c09aeb84

@ -22,7 +22,6 @@
#import "PropertyListPreferences.h"
#import "PushManager.h"
#import "SettingsTableViewController.h"
#import "SignalsViewController.h"
#import "UIColor+OWS.h"
#import "UIFont+OWS.h"
#import "UIUtil.h"

@ -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 {

@ -248,15 +248,6 @@ protocol CallServiceObserver: class {
self.callUIAdapter = CallUIAdapter(callService: self, contactsManager: self.contactsManager, notificationsAdapter: self.notificationsAdapter)
}
// MARK: - Class Methods
// MARK: Notifications
// Wrapping these class constants in a method to make it accessible to objc
// class func callServiceActiveCallNotificationName() -> String {
// return "CallServiceActiveCallNotification"
// }
// MARK: - Service Actions
/**

@ -41,9 +41,6 @@ class NonCallKitCallUIAdaptee: CallUIAdaptee {
Logger.debug("\(TAG) \(#function)")
// present Call View controller
// let callNotificationName = CallService.callServiceActiveCallNotificationName()
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: callNotificationName), object: call)
self.showCall(call)
// present lock screen notification

@ -34,23 +34,15 @@ extension CallUIAdaptee {
internal func showCall(_ call: SignalCall) {
AssertIsOnMainThread()
// let callNotificationName = CallService.callServiceActiveCallNotificationName()
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: callNotificationName), object: call)
let callViewController = CallViewController()
let thread = TSContactThread.getOrCreateThread(contactId: call.remotePhoneNumber)
callViewController.call = call
callViewController.thread = thread
callViewController.modalTransitionStyle = .crossDissolve
//Environment.getCurrent().signalsViewController
// TODO dismiss any modal, can/should we present from frontmost?
// let presentingViewController = UIApplication.shared.frontmostViewController
// presentingViewController?.present(callViewController, animated: true)
guard let presentingViewController = Environment.getCurrent().signalsViewController else {
Logger.error("in \(#function) signals view controller unexpectedly nil")
assertionFailure("in \(#function) signals view controller unexpectedly nil")
guard let presentingViewController = UIApplication.shared.frontmostViewController else {
Logger.error("in \(#function) frontmost view controller unexpectedly nil")
assertionFailure("in \(#function) frontmost view controller unexpectedly nil")
return
}

Loading…
Cancel
Save