From 4127c2b258e49e6bb555340d2a5b638c50fd90a2 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Tue, 11 Aug 2015 11:55:23 -0400
Subject: format channel_store to more closely match style guide and sort
 channels in channel store over sidebar

---
 web/react/components/sidebar.jsx | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

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

diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 46dfc1200..fb282e680 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -113,22 +113,9 @@ function getStateFromStores() {
         });
     }
 
-    var channels = ChannelStore.getAll();
-    if (channels) {
-        channels.sort(function chanSort(a, b) {
-            if (a.display_name.toLowerCase() < b.display_name.toLowerCase()) {
-                return -1;
-            }
-            if (a.display_name.toLowerCase() > b.display_name.toLowerCase()) {
-                return 1;
-            }
-            return 0;
-        });
-    }
-
     return {
         activeId: currentId,
-        channels: channels,
+        channels: ChannelStore.getAll(),
         members: members,
         showDirectChannels: showDirectChannels,
         hideDirectChannels: readDirectChannels
-- 
cgit v1.2.3-1-g7c22

