Send a Notification when a Folder’s name changes.

This commit is contained in:
Brent Simmons 2018-01-22 21:59:13 -08:00
parent 786138d6e7
commit 02ad70097e
1 changed files with 8 additions and 1 deletions

View File

@ -14,7 +14,14 @@ public final class Folder: DisplayNameProvider, Container, UnreadCountProvider,
public weak var account: Account? public weak var account: Account?
public var children = [AnyObject]() 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") static let untitledName = NSLocalizedString("Untitled ƒ", comment: "Folder name")
public let folderID: Int // not saved: per-run only public let folderID: Int // not saved: per-run only
static var incrementingID = 0 static var incrementingID = 0