From 10cdc1553e33f45e551f192f52a938c99235bad0 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 31 Mar 2019 16:12:03 -0700 Subject: [PATCH] =?UTF-8?q?Post=20display=20name=20did=20change=20notifica?= =?UTF-8?q?tion=20when=20an=20Account=E2=80=99s=20name=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/Account/Account.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index b935c4268..712d39490 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -56,9 +56,12 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, return settings.name } set { + let currentNameForDisplay = nameForDisplay if newValue != settings.name { settings.name = newValue - + if currentNameForDisplay != nameForDisplay { + postDisplayNameDidChangeNotification() + } } } }