UI: fix conversation selection

Change-Id: Ifd025bcb830ece10a77747be33da9440a293f7f6
diff --git a/Ring/Ring/AppDelegate.swift b/Ring/Ring/AppDelegate.swift
index 48ab70f..ada30b1 100644
--- a/Ring/Ring/AppDelegate.swift
+++ b/Ring/Ring/AppDelegate.swift
@@ -197,6 +197,7 @@
         if let path = self.certificatePath() {
             setenv("CA_ROOT_FILE", path, 1)
         }
+        self.window?.backgroundColor = UIColor.systemBackground
         return true
     }
 
diff --git a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard
index 671d765..c756dcf 100644
--- a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard
+++ b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard
@@ -41,26 +41,11 @@
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Wq-EJ-CAF">
-                                <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                                <subviews>
-                                    <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="NYW-Ie-8yB">
-                                        <rect key="frame" x="169" y="315" width="37" height="37"/>
-                                        <color key="color" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
-                                    </activityIndicatorView>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="NYW-Ie-8yB" firstAttribute="centerY" secondItem="6Wq-EJ-CAF" secondAttribute="centerY" id="I23-W6-yIz"/>
-                                    <constraint firstItem="NYW-Ie-8yB" firstAttribute="centerX" secondItem="6Wq-EJ-CAF" secondAttribute="centerX" id="vB4-hR-9sj"/>
-                                </constraints>
-                            </view>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="mrp-Ty-hZO"/>
                         <constraints>
                             <constraint firstItem="ehB-ol-cdx" firstAttribute="leading" secondItem="lhx-ny-Zct" secondAttribute="leading" id="AUO-95-xlZ"/>
-                            <constraint firstAttribute="trailing" secondItem="6Wq-EJ-CAF" secondAttribute="trailing" id="EuA-fk-PFm"/>
                             <constraint firstItem="04J-Zf-h3H" firstAttribute="trailing" secondItem="ehB-ol-cdx" secondAttribute="trailing" id="HZL-ep-59G"/>
-                            <constraint firstAttribute="bottom" secondItem="6Wq-EJ-CAF" secondAttribute="bottom" id="QKw-Wp-ff0"/>
                             <constraint firstItem="5cj-ge-3dv" firstAttribute="leading" secondItem="ehB-ol-cdx" secondAttribute="leading" id="ZMK-xT-VM8"/>
                             <constraint firstItem="5cj-ge-3dv" firstAttribute="trailing" secondItem="ehB-ol-cdx" secondAttribute="trailing" id="adg-fs-d5i"/>
                             <constraint firstItem="5cj-ge-3dv" firstAttribute="top" secondItem="ehB-ol-cdx" secondAttribute="top" id="bMn-Xz-w1J"/>
@@ -69,8 +54,6 @@
                             <constraint firstItem="04J-Zf-h3H" firstAttribute="leading" secondItem="ehB-ol-cdx" secondAttribute="leading" id="f4Y-Wq-YiD"/>
                             <constraint firstAttribute="trailing" secondItem="ehB-ol-cdx" secondAttribute="trailing" id="hsT-qM-JJP"/>
                             <constraint firstItem="5cj-ge-3dv" firstAttribute="top" secondItem="mrp-Ty-hZO" secondAttribute="top" id="ucp-wl-kSP"/>
-                            <constraint firstItem="6Wq-EJ-CAF" firstAttribute="top" secondItem="lhx-ny-Zct" secondAttribute="top" id="v3Q-NK-vb1"/>
-                            <constraint firstItem="6Wq-EJ-CAF" firstAttribute="leading" secondItem="lhx-ny-Zct" secondAttribute="leading" id="was-ym-C9C"/>
                         </constraints>
                     </view>
                     <connections>
@@ -78,7 +61,6 @@
                         <outlet property="conversationInSyncLabel" destination="04J-Zf-h3H" id="4J6-cN-Jg9"/>
                         <outlet property="currentCallButton" destination="ehB-ol-cdx" id="hXv-aJ-8DN"/>
                         <outlet property="currentCallLabel" destination="5cj-ge-3dv" id="HaN-nP-GKW"/>
-                        <outlet property="spinnerView" destination="6Wq-EJ-CAF" id="XKK-Rh-rmd"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="lOF-r3-fSY" userLabel="First Responder" sceneMemberID="firstResponder"/>
diff --git a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift
index 815a022..7f3a72b 100644
--- a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift
+++ b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift
@@ -62,9 +62,6 @@
 
     let log = SwiftyBeaver.self
 
-    @IBOutlet weak var tableView: UITableView!
-    @IBOutlet weak var spinnerView: UIView!
-
     var viewModel: ConversationViewModel!
     var isExecutingDeleteMessage: Bool = false
     private var isLocationSharingDurationLimited: Bool {
@@ -79,7 +76,6 @@
     @IBOutlet weak var conversationInSyncLabel: UILabel!
     @IBOutlet weak var scanButtonLeadingConstraint: NSLayoutConstraint!
     @IBOutlet weak var callButtonHeightConstraint: NSLayoutConstraint!
-    var swiftUIViewAdded: Bool = false
     var currentDocumentPickerMode: DocumentPickerMode = .none
 
     let tapAction = BehaviorRelay<Bool>(value: false)
@@ -94,13 +90,7 @@
         self.setupBindings()
         screenTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(screenTapped))
         self.view.addGestureRecognizer(screenTapRecognizer)
-    }
-
-    override func viewDidAppear(_ animated: Bool) {
-        super.viewDidAppear(animated)
-        if !self.swiftUIViewAdded {
-            self.addSwiftUIView()
-        }
+        self.addSwiftUIView()
     }
 
     override func viewWillDisappear(_ animated: Bool) {
@@ -124,7 +114,6 @@
     }
 
     private func addSwiftUIView() {
-        swiftUIViewAdded = true
         self.viewModel.swiftUIModel.hideNavigationBar
             .subscribe(onNext: { [weak self] (hide) in
                 guard let self = self else { return }
@@ -214,9 +203,6 @@
         swiftUIView.didMove(toParent: self)
         self.view.backgroundColor = UIColor.systemBackground
         self.view.sendSubviewToBack(swiftUIView.view)
-        DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {[weak self] in
-            self?.messagesLoadingFinished()
-        }
     }
 
     private func importDocument() {
@@ -573,8 +559,7 @@
     }
 
     func setupUI() {
-        spinnerView.backgroundColor = UIColor.jamiMsgBackground
-        self.view.backgroundColor = UIColor.jamiMsgTextFieldBackground
+        self.view.backgroundColor = UIColor.systemBackground
 
         Observable<(Data?, String?, String)>.combineLatest(self.viewModel.profileImageData.asObservable(),
                                                            self.viewModel.displayName.asObservable(),
@@ -639,10 +624,6 @@
         self.viewModel.startAudioCall()
     }
 
-    private func messagesLoadingFinished() {
-        self.spinnerView.isHidden = true
-    }
-
     func setupBindings() {
         self.viewModel.shouldDismiss
             .observe(on: MainScheduler.instance)
diff --git a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift
index 4370c04..67f7b14 100644
--- a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift
+++ b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift
@@ -42,7 +42,6 @@
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
         self.viewModel.closeAllPlayers()
-        self.navigationController?.setNavigationBarHidden(false, animated: false)
         self.navigationController?.setNavigationBarHidden(true, animated: animated)
     }