summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/post_view/post_info/post_info.jsx2
-rw-r--r--webapp/utils/post_utils.jsx20
2 files changed, 21 insertions, 1 deletions
diff --git a/webapp/components/post_view/post_info/post_info.jsx b/webapp/components/post_view/post_info/post_info.jsx
index f037bf03b..c07a58bc7 100644
--- a/webapp/components/post_view/post_info/post_info.jsx
+++ b/webapp/components/post_view/post_info/post_info.jsx
@@ -192,7 +192,7 @@ export default class PostInfo extends React.PureComponent {
/>
);
- if (dotMenu) {
+ if (PostUtils.shouldShowDotMenu(this.props.post)) {
options = (
<div
ref='dotMenu'
diff --git a/webapp/utils/post_utils.jsx b/webapp/utils/post_utils.jsx
index 991c8fbec..a71aeef31 100644
--- a/webapp/utils/post_utils.jsx
+++ b/webapp/utils/post_utils.jsx
@@ -82,3 +82,23 @@ export function canEditPost(post, editDisableAction) {
}
return canEdit;
}
+
+export function shouldShowDotMenu(post) {
+ if (Utils.isMobile()) {
+ return true;
+ }
+
+ if (!isSystemMessage(post)) {
+ return true;
+ }
+
+ if (canDeletePost(post)) {
+ return true;
+ }
+
+ if (canEditPost(post)) {
+ return true;
+ }
+
+ return false;
+}