summaryrefslogtreecommitdiffstats
path: root/web/react/utils/async_client.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-10-02 22:26:28 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-10-02 22:26:28 +0500
commitd8c5c4f7468bb07d8de904437726557c6fa9b436 (patch)
treec19af28e1ad6c2bf068bf64956461c25502f9bb3 /web/react/utils/async_client.jsx
parent813792dd600f4e485d52cc1066a8c1297578432d (diff)
parent41069d83d2b6ad5cca599f75292027e13d5b10f7 (diff)
downloadchat-d8c5c4f7468bb07d8de904437726557c6fa9b436.tar.gz
chat-d8c5c4f7468bb07d8de904437726557c6fa9b436.tar.bz2
chat-d8c5c4f7468bb07d8de904437726557c6fa9b436.zip
Merge branch 'master' of https://github.com/mattermost/platform into plt-375
Conflicts: web/react/components/user_settings/user_settings_appearance.jsx
Diffstat (limited to 'web/react/utils/async_client.jsx')
-rw-r--r--web/react/utils/async_client.jsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index ab2965000..7db3ef30d 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -152,21 +152,23 @@ export function getChannel(id) {
}
export function updateLastViewedAt() {
- if (isCallInProgress('updateLastViewed')) {
+ const channelId = ChannelStore.getCurrentId();
+
+ if (channelId === null) {
return;
}
- if (ChannelStore.getCurrentId() == null) {
+ if (isCallInProgress(`updateLastViewed${channelId}`)) {
return;
}
- callTracker.updateLastViewed = utils.getTimestamp();
+ callTracker[`updateLastViewed${channelId}`] = utils.getTimestamp();
client.updateLastViewedAt(
- ChannelStore.getCurrentId(),
- function updateLastViewedAtSuccess() {
+ channelId,
+ () => {
callTracker.updateLastViewed = 0;
},
- function updateLastViewdAtFailure(err) {
+ (err) => {
callTracker.updateLastViewed = 0;
dispatchError(err, 'updateLastViewedAt');
}
@@ -634,4 +636,4 @@ export function getMyTeam() {
dispatchError(err, 'getMyTeam');
}
);
-} \ No newline at end of file
+}