summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/channel_actions.jsx2
-rw-r--r--webapp/actions/global_actions.jsx2
-rw-r--r--webapp/actions/post_actions.jsx2
-rw-r--r--webapp/actions/websocket_actions.jsx2
4 files changed, 4 insertions, 4 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx
index ad2f315ee..952c8ada3 100644
--- a/webapp/actions/channel_actions.jsx
+++ b/webapp/actions/channel_actions.jsx
@@ -53,7 +53,7 @@ export function executeCommand(message, args, success, error) {
export function setChannelAsRead(channelIdParam) {
const channelId = channelIdParam || ChannelStore.getCurrentId();
- AsyncClient.updateLastViewedAt();
+ AsyncClient.viewChannel();
ChannelStore.resetCounts(channelId);
ChannelStore.emitChange();
if (channelId === ChannelStore.getCurrentId()) {
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index 9d135dd26..e1009e9c2 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -48,7 +48,7 @@ export function emitChannelClickEvent(channel) {
getMyChannelMembersPromise.then(() => {
AsyncClient.getChannelStats(chan.id, true);
- AsyncClient.updateLastViewedAt(chan.id);
+ AsyncClient.viewChannel(chan.id, ChannelStore.getCurrentId());
loadPosts(chan.id);
trackPage();
});
diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx
index d1e69cda7..71b9e826e 100644
--- a/webapp/actions/post_actions.jsx
+++ b/webapp/actions/post_actions.jsx
@@ -22,7 +22,7 @@ export function handleNewPost(post, msg) {
if (ChannelStore.getCurrentId() === post.channel_id) {
if (window.isActive) {
- AsyncClient.updateLastViewedAt(null, false);
+ AsyncClient.viewChannel();
} else {
AsyncClient.getChannel(post.channel_id);
}
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index 6c81a4ac9..f24802003 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -205,7 +205,7 @@ function handlePostEditEvent(msg) {
// Update channel state
if (ChannelStore.getCurrentId() === msg.broadcast.channel_id) {
if (window.isActive) {
- AsyncClient.updateLastViewedAt(null, false);
+ AsyncClient.viewChannel();
}
}
}