summaryrefslogtreecommitdiffstats
path: root/web/react/stores/post_store.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <asaad@spinpunch.com>2016-02-12 20:19:07 +0500
committerAsaad Mahmood <asaad@spinpunch.com>2016-02-12 20:19:07 +0500
commit7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a (patch)
tree069222c906cbf56feb003c806f60230cdbf81844 /web/react/stores/post_store.jsx
parent6bf1203581a295e82116c23bc4fe2d9d29362cf4 (diff)
parent6cb4f82ee5a17cd1d32ae19c266b78c2cfd604e6 (diff)
downloadchat-7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a.tar.gz
chat-7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a.tar.bz2
chat-7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a.zip
Merge branch 'master' of https://github.com/mattermost/platform into ui-fixes
Diffstat (limited to 'web/react/stores/post_store.jsx')
-rw-r--r--web/react/stores/post_store.jsx17
1 files changed, 1 insertions, 16 deletions
diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx
index b5bb93576..f5c342163 100644
--- a/web/react/stores/post_store.jsx
+++ b/web/react/stores/post_store.jsx
@@ -83,8 +83,6 @@ class PostStoreClass extends EventEmitter {
this.getCommentDraft = this.getCommentDraft.bind(this);
this.clearDraftUploads = this.clearDraftUploads.bind(this);
this.clearCommentDraftUploads = this.clearCommentDraftUploads.bind(this);
- this.storeLatestUpdate = this.storeLatestUpdate.bind(this);
- this.getLatestUpdate = this.getLatestUpdate.bind(this);
this.getCurrentUsersLatestPost = this.getCurrentUsersLatestPost.bind(this);
this.getCommentCount = this.getCommentCount.bind(this);
@@ -258,7 +256,7 @@ class PostStoreClass extends EventEmitter {
const np = newPosts.posts[pid];
if (np.delete_at === 0) {
combinedPosts.posts[pid] = np;
- if (combinedPosts.order.indexOf(pid) === -1) {
+ if (combinedPosts.order.indexOf(pid) === -1 && newPosts.order.indexOf(pid) !== -1) {
combinedPosts.order.push(pid);
}
}
@@ -507,19 +505,6 @@ class PostStoreClass extends EventEmitter {
}
});
}
- storeLatestUpdate(channelId, time) {
- if (!this.postsInfo.hasOwnProperty(channelId)) {
- this.postsInfo[channelId] = {};
- }
- this.postsInfo[channelId].latestPost = time;
- }
- getLatestUpdate(channelId) {
- if (this.postsInfo.hasOwnProperty(channelId) && this.postsInfo[channelId].hasOwnProperty('latestPost')) {
- return this.postsInfo[channelId].latestPost;
- }
-
- return 0;
- }
getCommentCount(post) {
const posts = this.getAllPosts(post.channel_id).posts;