 		NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .AccountRefreshDidFinish, object: nil)
 		NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil)
 
+		NotificationCenter.default.addObserver(self, selector: #selector(sidebarSelectionDidChange(_:)), name: .SidebarSelectionDidChange, object: nil)
 		NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
+		NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange(_:)), name: .DisplayNameDidChange, object: nil)
 
 		DispatchQueue.main.async {
 			self.updateWindowTitle()

	private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: "MainWindow")
	static var didPositionWindowOnFirstRun = false

	private var unreadCount: Int = 0 {
		didSet {
			if unreadCount != oldValue {
				updateWindowTitle()
			}
		}
	}

	private var shareToolbarItem: NSToolbarItem? {
		return window?.toolbar?.existingItem(withIdentifier: .Share)
	}

		CoalescingQueue.standard.add(self, #selector(makeToolbarValidate))
	}

	@objc func sidebarSelectionDidChange(_ note: Notification) {
		
		let selectedObjects = selectedObjectsInSidebar()
		guard selectedObjects?.count == 1 else {
			currentFeedOrFolder = nil
			return
		}
		
		guard let displayNameProvider = selectedObjects?[0] as? DisplayNameProvider else {
			currentFeedOrFolder = nil
			return
		}
		
		currentFeedOrFolder = displayNameProvider
		
	}
	
	@objc func unreadCountDidChange(_ note: Notification) {
		updateWindowTitleIfNecessary(note.object)
	}
	
	@objc func displayNameDidChange(_ note: Notification) {
		updateWindowTitleIfNecessary(note.object)
	}

	private func updateWindowTitleIfNecessary(_ object: Any?) {
		
		if let folder = currentFeedOrFolder as? Folder, let countNote = object as? Folder {
			if folder == countNote {
				updateWindowTitle()
				return
			}
		}
		
		if let feed = currentFeedOrFolder as? Feed, let countNote = object as? Feed {
			if feed == countNote {
				updateWindowTitle()
			}
		}
		
	}
	
	// MARK: - Toolbar
	
	@objc func makeToolbarValidate() {
