     
     private var doodles = [Doodle]() {
         didSet {
-            toolbarItems = doodles.isEmpty ? [] : [editButtonItem]
-            navigationController?.setToolbarHidden(doodles.isEmpty, animated: doodles.isEmpty)
+            editButtonItem.isEnabled = !doodles.isEmpty
         }
     }
     

        return wobble
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        title = NSLocalizedString("DOODLES", comment: "Doodles")
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(
            barButtonSystemItem: .add,
            target: self,
            action: #selector(addButtonPressed)
        )
        
//        navigationItem.leftBarButtonItem = UIBarButtonItem(
//            image: UIImage(systemName: "gear"),

        
        collectionView.allowsSelection = !editing
        collectionView.allowsMultipleSelection = editing
                
        refreshToolbarItems()
        selectedDoodles.removeAll()
        
        collectionView.reloadItems(at: collectionView.indexPathsForVisibleItems)
    }
