From ea906de5764ce57c344ee5bf5c017e8e81587b2d Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 1 May 2019 19:07:44 -0500 Subject: [PATCH] Make the default account always be first --- Shared/Tree/FeedTreeControllerDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/Tree/FeedTreeControllerDelegate.swift b/Shared/Tree/FeedTreeControllerDelegate.swift index bdf5f5c57..f674e125d 100644 --- a/Shared/Tree/FeedTreeControllerDelegate.swift +++ b/Shared/Tree/FeedTreeControllerDelegate.swift @@ -113,13 +113,13 @@ private extension FeedTreeControllerDelegate { func sortedAccountNodes(_ parent: Node) -> [Node] { - let nodes = AccountManager.shared.accounts.map { (account) -> Node in + let nodes = AccountManager.shared.sortedAccounts.map { (account) -> Node in let accountNode = parent.existingOrNewChildNode(with: account) accountNode.canHaveChildNodes = true accountNode.isGroupItem = true return accountNode } - return nodes.sortedAlphabetically() + return nodes } func nodeInArrayRepresentingObject(_ nodes: [Node], _ representedObject: AnyObject) -> Node? {