From 02ad70097ed956de86db41d8d07d9b51bfc08344 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 22 Jan 2018 21:59:13 -0800 Subject: [PATCH] =?UTF-8?q?Send=20a=20Notification=20when=20a=20Folder?= =?UTF-8?q?=E2=80=99s=20name=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/Account/Folder.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/Folder.swift b/Frameworks/Account/Folder.swift index fbdd67883..b507dbdf9 100644 --- a/Frameworks/Account/Folder.swift +++ b/Frameworks/Account/Folder.swift @@ -14,7 +14,14 @@ public final class Folder: DisplayNameProvider, Container, UnreadCountProvider, public weak var account: Account? public var children = [AnyObject]() - public private(set) var name: String? + + public var name: String? { + didSet { + account?.dirty = true + postDisplayNameDidChangeNotification() + } + } + static let untitledName = NSLocalizedString("Untitled ƒ", comment: "Folder name") public let folderID: Int // not saved: per-run only static var incrementingID = 0