From 324f330a3b89a3e33d4837b94089f41b460e4b1a Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 18 Oct 2017 18:21:36 -0700 Subject: [PATCH] =?UTF-8?q?Use=20localizedStandardCompare=20when=20sorting?= =?UTF-8?q?=20Account=20names.=20It=E2=80=99s=20likely=20I=20got=20the=20o?= =?UTF-8?q?rder=20backwards,=20but=20I=20won=E2=80=99t=20know=20until=20we?= =?UTF-8?q?=20have=20accounts=20other=20than=20the=20local=20account.=20(I?= =?UTF-8?q?=20always=20get=20this=20backwards,=20even=20knowing=20that=20I?= =?UTF-8?q?=20always=20get=20it=20backwards.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/Account/AccountManager.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Frameworks/Account/AccountManager.swift b/Frameworks/Account/AccountManager.swift index e9d964c74..8f5feb5c9 100644 --- a/Frameworks/Account/AccountManager.swift +++ b/Frameworks/Account/AccountManager.swift @@ -184,9 +184,7 @@ public final class AccountManager: UnreadCountProvider { if account2 === localAccount { return false } - - //TODO: Use localizedCaseInsensitiveCompare: - return account1.nameForDisplay < account2.nameForDisplay + return (account1.nameForDisplay as NSString).localizedStandardCompare(account2.nameForDisplay) == .orderedAscending } } }