summaryrefslogtreecommitdiffstats
path: root/web/react/utils/async_client.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-10 08:40:21 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-10 08:40:21 -0500
commit415276fa6a1af933a8b9b8f71afa81e36d9e0b13 (patch)
tree83df33bc7275b36df837be0c9f48914c281e9778 /web/react/utils/async_client.jsx
parent47c3ff91a3987d476ca058c063115bc95345f924 (diff)
parente80129a0e97af82a196bc47509c3a38296e8a4a2 (diff)
downloadchat-415276fa6a1af933a8b9b8f71afa81e36d9e0b13.tar.gz
chat-415276fa6a1af933a8b9b8f71afa81e36d9e0b13.tar.bz2
chat-415276fa6a1af933a8b9b8f71afa81e36d9e0b13.zip
Merge pull request #1694 from mattermost/revert-1625-ephemeral_messages
Revert "add helper method to add ephemeral messages; also switch 'delete mess…"
Diffstat (limited to 'web/react/utils/async_client.jsx')
-rw-r--r--web/react/utils/async_client.jsx15
1 files changed, 1 insertions, 14 deletions
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;