 }
 
 class DisconnectSetting: Setting {
+    let settingsVC: SettingsTableViewController
     let profile: Profile
     override var accessoryType: UITableViewCellAccessoryType { return .none }
     override var textAlignment: NSTextAlignment { return .center }

        return NSAttributedString(string: Strings.SettingsDisconnectSyncButton, attributes: [NSAttributedStringKey.foregroundColor: UIConstants.DestructiveRed])
    }
    init(settings: SettingsTableViewController) {
        self.profile = settings.profile
    }


            UIAlertAction(title: Strings.SettingsDisconnectDestructiveAction, style: .destructive) { (action) in
                FxALoginHelper.sharedInstance.applicationDidDisconnect(UIApplication.shared)
                LeanPlumClient.shared.set(attributes: [LPAttributeKey.signedInSync: self.profile.hasAccount()])

                // If there is more than one view controller in the navigation controller, we can pop.
                // Otherwise, assume that we got here directly from the App Menu and dismiss the VC.
                if let navigationController = navigationController, navigationController.viewControllers.count > 1 {
                    _ = navigationController.popViewController(animated: true)
                } else {
                    self.settingsVC.dismiss(animated: true, completion: nil)
                }
        })
        navigationController?.present(alertController, animated: true, completion: nil)
    }
