From 3c40a683a1735bc01a4dcddaf5b96803d3434628 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Thu, 12 Nov 2015 11:38:52 -0500
Subject: Sorted channel list before rendering them in the sidebar

---
 web/react/components/sidebar.jsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'web/react/components/sidebar.jsx')

diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index f5ce5c10e..e3ee9f14b 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -106,6 +106,8 @@ export default class Sidebar extends React.Component {
         const currentChannelId = ChannelStore.getCurrentId();
 
         const channels = Object.assign([], ChannelStore.getAll());
+        channels.sort((a, b) => a.display_name.localeCompare(b.display_name));
+
         const publicChannels = channels.filter((channel) => channel.type === Constants.OPEN_CHANNEL);
         const privateChannels = channels.filter((channel) => channel.type === Constants.PRIVATE_CHANNEL);
         const directChannels = channels.filter((channel) => channel.type === Constants.DM_CHANNEL);
-- 
cgit v1.2.3-1-g7c22

