From 104e63ded97e7b1c52033ae3ca433c564b9d53bb Mon Sep 17 00:00:00 2001
From: Michael Kirk <michael.code@endoftheworl.de>
Date: Fri, 29 Jun 2018 16:17:49 -0600
Subject: [PATCH] remove appearance juggling

---
 Signal/src/AppDelegate.m                      |  2 +-
 ...ShareToExistingContactViewController.swift | 21 ----------------
 Signal/src/ViewControllers/AvatarViewHelper.m | 15 ++++--------
 .../ContactShareViewHelper.swift              | 13 ----------
 .../ContactViewController.swift               |  7 ------
 .../ConversationViewController.m              | 23 ++----------------
 Signal/src/ViewControllers/InviteFlow.swift   | 10 --------
 .../MediaDetailViewController.m               |  5 ----
 .../NewContactThreadViewController.m          |  6 ++---
 .../Registration/RegistrationViewController.m |  2 +-
 .../FingerprintViewController.m               |  8 -------
 .../FingerprintViewScanController.m           | 12 ----------
 .../OWSAddToContactViewController.m           |  3 ---
 .../OWSConversationSettingsViewController.m   |  3 ---
 .../ShowGroupMembersViewController.m          |  8 -------
 Signal/src/util/MainAppContext.m              |  5 ----
 SignalMessaging/Views/ContactsViewHelper.h    |  4 ----
 SignalMessaging/Views/ContactsViewHelper.m    | 10 --------
 .../attachments/AttachmentSharing.m           | 10 +-------
 .../contacts/SelectRecipientViewController.m  |  2 +-
 SignalMessaging/utils/UIUtil.h                |  4 +---
 SignalMessaging/utils/UIUtil.m                | 24 +------------------
 .../utils/ShareAppExtensionContext.m          |  5 ----
 23 files changed, 15 insertions(+), 187 deletions(-)

diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m
index be9a3d338..df741815d 100644
--- a/Signal/src/AppDelegate.m
+++ b/Signal/src/AppDelegate.m
@@ -171,7 +171,7 @@ static NSTimeInterval launchStartedAt;
             [self versionMigrationsDidComplete];
         }];
 
-    [UIUtil applySignalAppearence];
+    [UIUtil setupSignalAppearence];
 
     if (CurrentAppContext().isRunningTests) {
         return YES;
diff --git a/Signal/src/ViewControllers/AddContactShareToExistingContactViewController.swift b/Signal/src/ViewControllers/AddContactShareToExistingContactViewController.swift
index c272d9f0e..8a2d5745a 100644
--- a/Signal/src/ViewControllers/AddContactShareToExistingContactViewController.swift
+++ b/Signal/src/ViewControllers/AddContactShareToExistingContactViewController.swift
@@ -87,17 +87,6 @@ class AddContactShareToExistingContactViewController: ContactsPicker, ContactsPi
         contactViewController.delegate = self
 
         let modal = OWSNavigationController(rootViewController: contactViewController)
-
-        // HACK otherwise CNContactViewController Navbar is shows window background color.
-        // RADAR rdar://28433898 http://www.openradar.me/28433898
-        // CNContactViewController incompatible with opaque navigation bar
-        modal.navigationBar.isTranslucent = true
-        if #available(iOS 10, *) {
-            // Contact navbar is blue in iOS9, so our white text works,
-            // but gray on iOS10+, in which case we want the system default black text.
-            UIUtil.applyDefaultSystemAppearence()
-        }
-
         self.present(modal, animated: true)
     }
 
@@ -146,16 +135,6 @@ class AddContactShareToExistingContactViewController: ContactsPicker, ContactsPi
             return
         }
 
-        // HACK otherwise CNContactViewController Navbar is shows window background color.
-        // RADAR rdar://28433898 http://www.openradar.me/28433898
-        // CNContactViewController incompatible with opaque navigation bar
-        navigationController.navigationBar.isTranslucent = false
-        if #available(iOS 10, *) {
-            // Contact navbar is blue in iOS9, so our white text works,
-            // but gray on iOS10+, in which case we want the system default black text.
-            UIUtil.applySignalAppearence()
-        }
-
         let previousViewControllerIndex = navigationController.viewControllers.index(before: myIndex)
         let previousViewController = navigationController.viewControllers[previousViewControllerIndex]
 
diff --git a/Signal/src/ViewControllers/AvatarViewHelper.m b/Signal/src/ViewControllers/AvatarViewHelper.m
index f58f34b30..7fa225122 100644
--- a/Signal/src/ViewControllers/AvatarViewHelper.m
+++ b/Signal/src/ViewControllers/AvatarViewHelper.m
@@ -81,9 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
         picker.sourceType = UIImagePickerControllerSourceTypeCamera;
         picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage ];
 
-        [self.delegate.fromViewController presentViewController:picker
-                                                       animated:YES
-                                                     completion:[UIUtil modalCompletionBlock]];
+        [self.delegate.fromViewController presentViewController:picker animated:YES completion:nil];
     }];
 }
 
@@ -103,9 +101,7 @@ NS_ASSUME_NONNULL_BEGIN
         picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
         picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage ];
 
-        [self.delegate.fromViewController presentViewController:picker
-                                                       animated:YES
-                                                     completion:[UIUtil modalCompletionBlock]];
+        [self.delegate.fromViewController presentViewController:picker animated:YES completion:nil];
     }];
 }
 
@@ -144,10 +140,9 @@ NS_ASSUME_NONNULL_BEGIN
                                                [self.delegate avatarDidChange:dstImage];
                                            });
                                        }];
-                                   [self.delegate.fromViewController
-                                       presentViewController:vc
-                                                    animated:YES
-                                                  completion:[UIUtil modalCompletionBlock]];
+                                   [self.delegate.fromViewController presentViewController:vc
+                                                                                  animated:YES
+                                                                                completion:nil];
                                }
                            }];
 }
diff --git a/Signal/src/ViewControllers/ContactShareViewHelper.swift b/Signal/src/ViewControllers/ContactShareViewHelper.swift
index a83511380..849a096d5 100644
--- a/Signal/src/ViewControllers/ContactShareViewHelper.swift
+++ b/Signal/src/ViewControllers/ContactShareViewHelper.swift
@@ -167,16 +167,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
                                                                                  action: #selector(didFinishEditingContact))
 
         let modal = OWSNavigationController(rootViewController: contactViewController)
-        // HACK otherwise CNContactViewController Navbar is shows window background color.
-        // RADAR rdar://28433898 http://www.openradar.me/28433898
-        // CNContactViewController incompatible with opaque navigation bar
-        modal.navigationBar.isTranslucent = true
-        if #available(iOS 10, *) {
-            // Contact navbar is blue in iOS9, so our white text works,
-            // but gray on iOS10+, in which case we want the system default black text.
-            UIUtil.applyDefaultSystemAppearence()
-        }
-
         fromViewController.present(modal, animated: true)
     }
 
@@ -197,7 +187,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
         }
 
         let viewController = AddContactShareToExistingContactViewController(contactShare: contactShare)
-        UIUtil.applySignalAppearence()
         navigationController.pushViewController(viewController, animated: true)
     }
 
@@ -211,7 +200,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
             return
         }
 
-        UIUtil.applySignalAppearence()
         delegate.didCreateOrEditContact()
     }
 
@@ -223,7 +211,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
             return
         }
 
-        UIUtil.applySignalAppearence()
         delegate.didCreateOrEditContact()
     }
 }
diff --git a/Signal/src/ViewControllers/ContactViewController.swift b/Signal/src/ViewControllers/ContactViewController.swift
index 174d33ec4..945a9628b 100644
--- a/Signal/src/ViewControllers/ContactViewController.swift
+++ b/Signal/src/ViewControllers/ContactViewController.swift
@@ -78,12 +78,6 @@ class ContactViewController: OWSViewController, ContactShareViewHelperDelegate {
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
 
-        // Use "dark" style status bar in this view,
-        // But we don't apply the entire default system UI (UIUtil.applyDefaultSystemAppearence) because
-        // doing so while pushing onto an existing nav controller who's navbars are hidden corrupts the
-        // title label/navbar items elsewhere in the stack.
-        CurrentAppContext().setStatusBarStyle(.default)
-
         guard let navigationController = self.navigationController else {
             owsFail("\(logTag) in \(#function) navigationController was unexpectedly nil")
             return
@@ -677,7 +671,6 @@ class ContactViewController: OWSViewController, ContactShareViewHelperDelegate {
         Logger.info("\(logTag) \(#function)")
         updateContent()
 
-        UIUtil.applySignalAppearence()
         self.dismiss(animated: true)
     }
 }
diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m
index aef912cc5..838665036 100644
--- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m
+++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m
@@ -676,9 +676,6 @@ typedef enum : NSUInteger {
 
     [super viewWillAppear:animated];
 
-    // In case we're dismissing a CNContactViewController, or DocumentPicker which requires default system appearance
-    [UIUtil applySignalAppearence];
-
     // We need to recheck on every appearance, since the user may have left the group in the settings VC,
     // or on another device.
     [self hideInputIfNeeded];
@@ -2781,10 +2778,6 @@ typedef enum : NSUInteger {
     didPickDocumentPicker:(UIDocumentPickerViewController *)documentPicker
 {
     documentPicker.delegate = self;
-    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
-        // post iOS11, document picker has no blue header.
-        [UIUtil applyDefaultSystemAppearence];
-    }
 
     [self dismissKeyBoard];
     [self presentViewController:documentPicker animated:YES completion:nil];
@@ -2796,16 +2789,6 @@ typedef enum : NSUInteger {
 {
     DDLogDebug(@"%@ Picked document at url: %@", self.logTag, url);
 
-    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
-        // post iOS11, document picker has no blue header.
-        [UIUtil applySignalAppearence];
-    }
-
-    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
-        // post iOS11, document picker has no blue header.
-        [UIUtil applySignalAppearence];
-    }
-
     NSString *type;
     NSError *typeError;
     [url getResourceValue:&type forKey:NSURLTypeIdentifierKey error:&typeError];
@@ -2896,7 +2879,7 @@ typedef enum : NSUInteger {
         picker.delegate = self;
         
         [self dismissKeyBoard];
-        [self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]];
+        [self presentViewController:picker animated:YES completion:nil];
     }];
 }
 
@@ -2932,7 +2915,7 @@ typedef enum : NSUInteger {
         picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage, (__bridge NSString *)kUTTypeMovie ];
         
         [self dismissKeyBoard];
-        [self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]];
+        [self presentViewController:picker animated:YES completion:nil];
     }];
 }
 
@@ -2942,7 +2925,6 @@ typedef enum : NSUInteger {
 
 - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
 {
-    [UIUtil modalCompletionBlock]();
     [self dismissViewControllerAnimated:YES completion:nil];
 }
 
@@ -2959,7 +2941,6 @@ typedef enum : NSUInteger {
 - (void)imagePickerController:(UIImagePickerController *)picker
     didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> *)info
 {
-    [UIUtil modalCompletionBlock]();
     [self resetFrame];
 
     NSURL *referenceURL = [info valueForKey:UIImagePickerControllerReferenceURL];
diff --git a/Signal/src/ViewControllers/InviteFlow.swift b/Signal/src/ViewControllers/InviteFlow.swift
index dff342637..c4fbb5dcd 100644
--- a/Signal/src/ViewControllers/InviteFlow.swift
+++ b/Signal/src/ViewControllers/InviteFlow.swift
@@ -189,14 +189,6 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
 
     @objc
     public func sendSMSTo(phoneNumbers: [String]) {
-        if #available(iOS 10.0, *) {
-            // iOS10 message compose view doesn't respect some system appearence attributes.
-            // Specifically, the title is white, but the navbar is gray.
-            // So, we have to set system appearence before init'ing the message compose view controller in order
-            // to make its colors legible.
-            // Then we have to be sure to set it back in the ComposeViewControllerDelegate callback.
-            UIUtil.applyDefaultSystemAppearence()
-        }
         let messageComposeViewController = MFMessageComposeViewController()
         messageComposeViewController.messageComposeDelegate = self
         messageComposeViewController.recipients = phoneNumbers
@@ -209,8 +201,6 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
     // MARK: MessageComposeViewControllerDelegate
 
     func messageComposeViewController(_ controller: MFMessageComposeViewController, didFinishWith result: MessageComposeResult) {
-        // Revert system styling applied to make messaging app legible on iOS10.
-        UIUtil.applySignalAppearence()
         self.presentingViewController.dismiss(animated: true) {
             switch result {
             case .failed:
diff --git a/Signal/src/ViewControllers/MediaDetailViewController.m b/Signal/src/ViewControllers/MediaDetailViewController.m
index a196643e3..9630f89ac 100644
--- a/Signal/src/ViewControllers/MediaDetailViewController.m
+++ b/Signal/src/ViewControllers/MediaDetailViewController.m
@@ -143,11 +143,6 @@ NS_ASSUME_NONNULL_BEGIN
     [super viewDidLoad];
 
     [self createContents];
-
-    // Even though bars are opaque, we want content to be layed out behind them.
-    // The bars might obscure part of the content, but they can easily be hidden by tapping
-    // The alternative would be that content would shift when the navbars hide.
-    self.extendedLayoutIncludesOpaqueBars = YES;
 }
 
 - (void)viewWillAppear:(BOOL)animated
diff --git a/Signal/src/ViewControllers/NewContactThreadViewController.m b/Signal/src/ViewControllers/NewContactThreadViewController.m
index 53df870f0..855397520 100644
--- a/Signal/src/ViewControllers/NewContactThreadViewController.m
+++ b/Signal/src/ViewControllers/NewContactThreadViewController.m
@@ -745,12 +745,10 @@ NS_ASSUME_NONNULL_BEGIN
     if ([self presentedViewController]) {
         [self dismissViewControllerAnimated:YES
                                  completion:^{
-                                     [self presentViewController:alertController
-                                                        animated:YES
-                                                      completion:[UIUtil modalCompletionBlock]];
+                                     [self presentViewController:alertController animated:YES completion:nil];
                                  }];
     } else {
-        [self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]];
+        [self presentViewController:alertController animated:YES completion:nil];
     }
 }
 
diff --git a/Signal/src/ViewControllers/Registration/RegistrationViewController.m b/Signal/src/ViewControllers/Registration/RegistrationViewController.m
index 682938575..9c990d626 100644
--- a/Signal/src/ViewControllers/Registration/RegistrationViewController.m
+++ b/Signal/src/ViewControllers/Registration/RegistrationViewController.m
@@ -485,7 +485,7 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi
     countryCodeController.countryCodeDelegate = self;
     OWSNavigationController *navigationController =
         [[OWSNavigationController alloc] initWithRootViewController:countryCodeController];
-    [self presentViewController:navigationController animated:YES completion:[UIUtil modalCompletionBlock]];
+    [self presentViewController:navigationController animated:YES completion:nil];
 }
 
 - (void)backgroundTapped:(UIGestureRecognizer *)sender
diff --git a/Signal/src/ViewControllers/ThreadSettings/FingerprintViewController.m b/Signal/src/ViewControllers/ThreadSettings/FingerprintViewController.m
index d731f0f56..80cf20b1d 100644
--- a/Signal/src/ViewControllers/ThreadSettings/FingerprintViewController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/FingerprintViewController.m
@@ -398,12 +398,6 @@ typedef void (^CustomLayoutBlock)(void);
     [self.view setNeedsLayout];
 }
 
-- (void)viewWillAppear:(BOOL)animated
-{
-    // In case we're returning from activity view that needed default system styles.
-    [UIUtil applySignalAppearence];
-}
-
 #pragma mark -
 
 - (void)showSharingActivityWithCompletion:(nullable void (^)(void))completionHandler
@@ -427,7 +421,6 @@ typedef void (^CustomLayoutBlock)(void);
         if (completionHandler) {
             completionHandler();
         }
-        [UIUtil applySignalAppearence];
     };
 
     // This value was extracted by inspecting `activityType` in the activityController.completionHandler
@@ -440,7 +433,6 @@ typedef void (^CustomLayoutBlock)(void);
         iCloudActivityType // This isn't being excluded. RADAR https://openradar.appspot.com/27493621
     ];
 
-    [UIUtil applyDefaultSystemAppearence];
     [self presentViewController:activityController animated:YES completion:nil];
 }
 
diff --git a/Signal/src/ViewControllers/ThreadSettings/FingerprintViewScanController.m b/Signal/src/ViewControllers/ThreadSettings/FingerprintViewScanController.m
index cce0be4f5..6775045ec 100644
--- a/Signal/src/ViewControllers/ThreadSettings/FingerprintViewScanController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/FingerprintViewScanController.m
@@ -100,20 +100,8 @@ NS_ASSUME_NONNULL_BEGIN
     [cameraInstructionLabel autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:instructionsVMargin];
 }
 
-- (void)viewWillAppear:(BOOL)animated
-{
-    // In case we're returning from activity view that needed default system styles.
-    [UIUtil applySignalAppearence];
-}
-
-- (void)viewWillDisappear:(BOOL)animated
-{
-    [super viewWillDisappear:YES];
-}
-
 #pragma mark - Action
 
-
 - (void)viewDidAppear:(BOOL)animated
 {
     [super viewDidAppear:animated];
diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSAddToContactViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSAddToContactViewController.m
index d60423603..7ac85c900 100644
--- a/Signal/src/ViewControllers/ThreadSettings/OWSAddToContactViewController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/OWSAddToContactViewController.m
@@ -180,9 +180,6 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
-
-    // In case we're dismissing a CNContactViewController which requires default system appearance
-    [UIUtil applySignalAppearence];
 }
 
 #pragma mark - Actions
diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m
index 016c4ce52..9c10fe940 100644
--- a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m
@@ -852,9 +852,6 @@ NS_ASSUME_NONNULL_BEGIN
 {
     [super viewWillAppear:animated];
 
-    // In case we're dismissing a CNContactViewController which requires default system appearance
-    [UIUtil applySignalAppearence];
-
     // HACK to unselect rows when swiping back
     // http://stackoverflow.com/questions/19379510/uitableviewcell-doesnt-get-deselected-when-swiping-back-quickly
     [self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
diff --git a/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m b/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m
index 7a006f84a..2e890a740 100644
--- a/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m
@@ -105,14 +105,6 @@ NS_ASSUME_NONNULL_BEGIN
     [self updateTableContents];
 }
 
-- (void)viewWillAppear:(BOOL)animated
-{
-    [super viewWillAppear:animated];
-
-    // In case we're dismissing a CNContactViewController which requires default system appearance
-    [UIUtil applySignalAppearence];
-}
-
 #pragma mark - Table Contents
 
 - (void)updateTableContents
diff --git a/Signal/src/util/MainAppContext.m b/Signal/src/util/MainAppContext.m
index 7fed2dc6b..9eaa0f440 100644
--- a/Signal/src/util/MainAppContext.m
+++ b/Signal/src/util/MainAppContext.m
@@ -136,11 +136,6 @@ NS_ASSUME_NONNULL_BEGIN
         [[UIApplication sharedApplication] userInterfaceLayoutDirection] == UIUserInterfaceLayoutDirectionRightToLeft;
 }
 
-- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle
-{
-    [[UIApplication sharedApplication] setStatusBarStyle:statusBarStyle];
-}
-
 - (void)setStatusBarHidden:(BOOL)isHidden animated:(BOOL)isAnimated
 {
     [[UIApplication sharedApplication] setStatusBarHidden:isHidden animated:isAnimated];
diff --git a/SignalMessaging/Views/ContactsViewHelper.h b/SignalMessaging/Views/ContactsViewHelper.h
index e48b1675a..b367e6fa2 100644
--- a/SignalMessaging/Views/ContactsViewHelper.h
+++ b/SignalMessaging/Views/ContactsViewHelper.h
@@ -68,10 +68,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (NSArray<Contact *> *)nonSignalContactsMatchingSearchString:(NSString *)searchText;
 
-/**
- * NOTE: This method calls `[UIUtil applyDefaultSystemAppearence]`.
- * When using this method, you must call `[UIUtil applySignalAppearence]` once contact editing is finished;
- */
 - (void)presentContactViewControllerForRecipientId:(NSString *)recipientId
                                 fromViewController:(UIViewController<ContactEditingDelegate> *)fromViewController
                                    editImmediately:(BOOL)shouldEditImmediately;
diff --git a/SignalMessaging/Views/ContactsViewHelper.m b/SignalMessaging/Views/ContactsViewHelper.m
index b6872af6b..581c16a4a 100644
--- a/SignalMessaging/Views/ContactsViewHelper.m
+++ b/SignalMessaging/Views/ContactsViewHelper.m
@@ -394,16 +394,6 @@ NS_ASSUME_NONNULL_BEGIN
 
     OWSNavigationController *modal = [[OWSNavigationController alloc] initWithRootViewController:contactViewController];
 
-    // HACK otherwise CNContactViewController Navbar is shows window background color.
-    // RADAR rdar://28433898 http://www.openradar.me/28433898
-    // CNContactViewController incompatible with opaque navigation bar
-    modal.navigationBar.translucent = YES;
-    if (@available(iOS 10, *)) {
-        // Contact navbar is blue in iOS9, so our white tex works,
-        // but gray on iOS10+, in which case we want the system default black text.
-        [UIUtil applyDefaultSystemAppearence];
-    }
-
     // We want the presentation to imply a "replacement" in this case.
     if (shouldEditImmediately) {
         modal.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
diff --git a/SignalMessaging/attachments/AttachmentSharing.m b/SignalMessaging/attachments/AttachmentSharing.m
index c648ccd18..eb8603c25 100644
--- a/SignalMessaging/attachments/AttachmentSharing.m
+++ b/SignalMessaging/attachments/AttachmentSharing.m
@@ -74,9 +74,6 @@ NS_ASSUME_NONNULL_BEGIN
             NSArray *__nullable returnedItems,
             NSError *__nullable activityError) {
 
-            DDLogDebug(@"%@ applying signal appearence", self.logTag);
-            [UIUtil applySignalAppearence];
-
             if (activityError) {
                 DDLogInfo(@"%@ Failed to share with activityError: %@", self.logTag, activityError);
             } else if (completed) {
@@ -93,12 +90,7 @@ NS_ASSUME_NONNULL_BEGIN
             fromViewController = fromViewController.presentedViewController;
         }
         OWSAssert(fromViewController);
-        [fromViewController presentViewController:activityViewController
-                                         animated:YES
-                                       completion:^{
-                                           DDLogDebug(@"%@ applying default system appearence", self.logTag);
-                                           [UIUtil applyDefaultSystemAppearence];
-                                       }];
+        [fromViewController presentViewController:activityViewController animated:YES completion:nil];
     });
 }
 
diff --git a/SignalMessaging/contacts/SelectRecipientViewController.m b/SignalMessaging/contacts/SelectRecipientViewController.m
index 1251615df..9992043ad 100644
--- a/SignalMessaging/contacts/SelectRecipientViewController.m
+++ b/SignalMessaging/contacts/SelectRecipientViewController.m
@@ -270,7 +270,7 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien
     } else {
         OWSNavigationController *navigationController =
             [[OWSNavigationController alloc] initWithRootViewController:countryCodeController];
-        [self presentViewController:navigationController animated:YES completion:[UIUtil modalCompletionBlock]];
+        [self presentViewController:navigationController animated:YES completion:nil];
     }
 }
 
diff --git a/SignalMessaging/utils/UIUtil.h b/SignalMessaging/utils/UIUtil.h
index cb8a9ef8f..5119c7eda 100644
--- a/SignalMessaging/utils/UIUtil.h
+++ b/SignalMessaging/utils/UIUtil.h
@@ -20,8 +20,6 @@ typedef void (^completionBlock)(void);
 + (void)applyRoundedBorderToImageView:(UIImageView *)imageView;
 + (void)removeRoundedBorderToImageView:(UIImageView *__strong *)imageView;
 
-+ (completionBlock)modalCompletionBlock;
-+ (void)applyDefaultSystemAppearence;
-+ (void)applySignalAppearence;
++ (void)setupSignalAppearence;
 
 @end
diff --git a/SignalMessaging/utils/UIUtil.m b/SignalMessaging/utils/UIUtil.m
index 0dbd93abb..3d3f77881 100644
--- a/SignalMessaging/utils/UIUtil.m
+++ b/SignalMessaging/utils/UIUtil.m
@@ -24,31 +24,9 @@
     [[*imageView layer] setCornerRadius:0];
 }
 
-+ (completionBlock)modalCompletionBlock
++ (void)setupSignalAppearence
 {
-    completionBlock block = ^void() {
-        [CurrentAppContext() setStatusBarStyle:UIStatusBarStyleLightContent];
-    };
-
-    return block;
-}
-
-+ (void)applyDefaultSystemAppearence
-{
-//    [CurrentAppContext() setStatusBarStyle:UIStatusBarStyleDefault];
-//    [[UINavigationBar appearance] setBarStyle:UIBarStyleDefault];
-//    [[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
-//    [[UIBarButtonItem appearance] setTintColor:[UIColor blackColor]];
-//    [[UINavigationBar appearance] setTitleTextAttributes:@{
-//        NSForegroundColorAttributeName : [UIColor blackColor],
-//    }];
-}
-
-+ (void)applySignalAppearence
-{
-    //    [CurrentAppContext() setStatusBarStyle:UIStatusBarStyleLightContent];
     UINavigationBar.appearance.barTintColor = UIColor.ows_navbarBackgroundColor;
-    //    [[UINavigationBar appearance] setBarTintColor:[UIColor ows_materialBlueColor]];
     UINavigationBar.appearance.tintColor = UIColor.ows_navbarForegroundColor;
     UIToolbar.appearance.barTintColor = UIColor.ows_navbarBackgroundColor;
     UIToolbar.appearance.tintColor = UIColor.ows_navbarForegroundColor;
diff --git a/SignalShareExtension/utils/ShareAppExtensionContext.m b/SignalShareExtension/utils/ShareAppExtensionContext.m
index 35dec6ddc..835616ce7 100644
--- a/SignalShareExtension/utils/ShareAppExtensionContext.m
+++ b/SignalShareExtension/utils/ShareAppExtensionContext.m
@@ -130,11 +130,6 @@ NS_ASSUME_NONNULL_BEGIN
         == NSLocaleLanguageDirectionRightToLeft;
 }
 
-- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle
-{
-    DDLogInfo(@"Ignoring request to set status bar style since we're in an app extension");
-}
-
 - (void)setStatusBarHidden:(BOOL)isHidden animated:(BOOL)isAnimated
 {
     DDLogInfo(@"Ignoring request to show/hide status bar style since we're in an app extension");