         alert.addTextFieldWithConfigurationHandler({(textField: UITextField!) in
             textField.placeholder = "<folder name>"
             textField.secureTextEntry = false
+            NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(self.notificationReceived(_:)), name: UITextFieldTextDidChangeNotification, object: textField)
         })
         
         self.presentViewController(alert, animated: true) {}
     }
 
     func addFolder(alert: UIAlertAction!, alertController: UIAlertController) {
-        if let folderName = alertController.textFields?[0].text  {
+        if let folderName = alertController.textFields?[0].text {
             if let sqllitbk = self.profile.bookmarks as? MergedSQLiteBookmarks {
                 sqllitbk.createFolder(folderName).upon { _ in
                     postAsyncToMain {

    var addRemoveFolderButton:UIBarButtonItem!
    var removeFolderButton:UIBarButtonItem!
    var addFolderButton:UIBarButtonItem!
    
    var isEditingInvidivualBookmark:Bool = false

    init() {

        switch notification.name {
        case NotificationFirefoxAccountChanged:
            self.reloadData()
            break
        case UITextFieldTextDidChangeNotification:
            if let okAction = addBookmarksFolderOkAction, let textField = notification.object as? UITextField {
                okAction.enabled = (textField.text?.characters.count > 0)
            }
            break
        default:
            // no need to do anything at all
