From e80129a0e97af82a196bc47509c3a38296e8a4a2 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 10 Dec 2015 08:32:30 -0500 Subject: =?UTF-8?q?Revert=20"add=20helper=20method=20to=20add=20ephemeral?= =?UTF-8?q?=20messages;=20also=20switch=20'delete=20mess=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/react/utils/async_client.jsx | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'web/react/utils/async_client.jsx') diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index 9cdbd73a4..88b5aa739 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -82,7 +82,7 @@ export function getChannels(checkVersion) { ); } -export function getChannelAndAddUnreadMessages(id, unreadCount) { +export function getChannel(id) { if (isCallInProgress('getChannel' + id)) { return; } @@ -97,7 +97,6 @@ export function getChannelAndAddUnreadMessages(id, unreadCount) { return; } - data.channel.total_msg_count += (unreadCount || 0); AppDispatcher.handleServerAction({ type: ActionTypes.RECIEVED_CHANNEL, channel: data.channel, @@ -111,10 +110,6 @@ export function getChannelAndAddUnreadMessages(id, unreadCount) { ); } -export function getChannel(id) { - getChannelAndAddUnreadMessages(id, 0); -} - export function updateLastViewedAt(id) { let channelId; if (id) { @@ -136,14 +131,6 @@ export function updateLastViewedAt(id) { channelId, () => { callTracker.updateLastViewed = 0; - - var channel = ChannelStore.get(channelId); - var member = ChannelStore.getMember(channelId); - if (channel && member) { - member.msg_count = channel.total_msg_count; - member.last_viewed_at = utils.getTimestamp(); - ChannelStore.setChannelMember(member); - } }, (err) => { callTracker.updateLastViewed = 0; -- cgit v1.2.3-1-g7c22