PLT-6900: Hide DotMenu container when DotMenu empty. (#6770)

This commit is contained in:
George Goldberg
2017-06-28 06:44:02 +01:00
committed by Saturnino Abril
parent 155c6600aa
commit 99fc4b0988
2 changed files with 21 additions and 1 deletions

View File

@@ -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;
}