PLT-6900: Hide DotMenu container when DotMenu empty. (#6770)
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
155c6600aa
Коммит
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;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user