mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6900: Hide DotMenu container when DotMenu empty. (#6770)
This commit is contained in:
committed by
Saturnino Abril
parent
155c6600aa
commit
99fc4b0988
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user