summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_info.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-08-19 09:52:03 -0400
committerJoramWilander <jwawilander@gmail.com>2015-08-19 09:52:03 -0400
commitcc40ca1ac01063441c35f8e5b57f813561a0b739 (patch)
treebb3b8ffab02d301cdb443f0cd65ef6627c4ecc37 /web/react/components/post_info.jsx
parent104f4a5ad8ee8bdd31713c31f355303fc1536e46 (diff)
downloadchat-cc40ca1ac01063441c35f8e5b57f813561a0b739.tar.gz
chat-cc40ca1ac01063441c35f8e5b57f813561a0b739.tar.bz2
chat-cc40ca1ac01063441c35f8e5b57f813561a0b739.zip
Added a message deleted indicator when a post is deleted to let the user know what's happening.
Diffstat (limited to 'web/react/components/post_info.jsx')
-rw-r--r--web/react/components/post_info.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx
index c5b015cb9..c96a04c7c 100644
--- a/web/react/components/post_info.jsx
+++ b/web/react/components/post_info.jsx
@@ -22,6 +22,10 @@ export default class PostInfo extends React.Component {
var isOwner = UserStore.getCurrentId() === post.user_id;
var isAdmin = UserStore.getCurrentUser().roles.indexOf('admin') > -1;
+ if (post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING || post.state === Constants.POST_DELETED) {
+ return '';
+ }
+
var type = 'Post';
if (post.root_id && post.root_id.length > 0) {
type = 'Comment';