mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Disable the edit/quote menu for non-standard comments
Summary: Fixes T4930. We currently show the edit/quote menu if a transaction group has //inline// comments, but this doesn't make sense and doesn't work properly. Only show this menu if the group has a normal comment. Test Plan: Viewed these groups: - Normal comment (edits fine). - Just inlines (no more edit menu). - Inline + comment (edits fine, affects the normal comment properly). Reviewers: btrahan Reviewed By: btrahan Subscribers: bitglue, epriestley Maniphest Tasks: T4930 Differential Revision: https://secure.phabricator.com/D9180
This commit is contained in:
parent
b64407d47e
commit
703e0b3968
1 changed files with 14 additions and 5 deletions
|
@ -382,13 +382,22 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
|||
->setAnchor($anchor);
|
||||
}
|
||||
|
||||
$has_deleted_comment = $xaction->getComment() &&
|
||||
$xaction->getComment()->getIsDeleted();
|
||||
$transaction_type = $xaction->getTransactionType();
|
||||
$comment_type = PhabricatorTransactions::TYPE_COMMENT;
|
||||
$is_normal_comment = ($transaction_type == $comment_type);
|
||||
|
||||
$has_removed_comment = $xaction->getComment() &&
|
||||
$xaction->getComment()->getIsRemoved();
|
||||
if ($this->getShowEditActions() &&
|
||||
!$this->isPreview &&
|
||||
$is_normal_comment) {
|
||||
|
||||
$has_deleted_comment =
|
||||
$xaction->getComment() &&
|
||||
$xaction->getComment()->getIsDeleted();
|
||||
|
||||
$has_removed_comment =
|
||||
$xaction->getComment() &&
|
||||
$xaction->getComment()->getIsRemoved();
|
||||
|
||||
if ($this->getShowEditActions() && !$this->isPreview) {
|
||||
if ($xaction->getCommentVersion() > 1 && !$has_removed_comment) {
|
||||
$event->setIsEdited(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue