From cd9015a967358975fb453cf115f011db2064777d Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Thu, 11 May 2017 08:11:12 -0400
Subject: Fix channels getting marked unread again on channel switch (#6390)

---
 webapp/actions/global_actions.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/actions/global_actions.jsx')

diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index 79706b594..3c88a7013 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -58,7 +58,7 @@ export function emitChannelClickEvent(channel) {
 
         getMyChannelMemberPromise.then(() => {
             getChannelStats(chan.id)(dispatch, getState);
-            viewChannel(chan.id)(dispatch, getState);
+            viewChannel(chan.id, oldChannelId)(dispatch, getState);
             loadPosts(chan.id);
 
             // Mark previous and next channel as read
-- 
cgit v1.2.3-1-g7c22

