mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
Don't publish anything for "Disable Mail" / "Enable Mail" on projects
Summary: Fixes T10466. Currently, clicking "Disable Mail" or "Enable Mail" on a project toggles an edge, but it gets a default "added an edge" story and transaction record. These are confusing, useless and not interesting, so just hide them. Test Plan: - Before patch: clicked enable/disable mail, saw "added an edge" / "removed an edge" stories in feed and project history. - After patch: clicked enable/disable mail, saw nothing in feed or project history. - (Note that this patch is not retroactive for feed, so already-published stories won't unpublish.) Reviewers: chad Reviewed By: chad Maniphest Tasks: T10466 Differential Revision: https://secure.phabricator.com/D15361
This commit is contained in:
parent
5295c6ba1e
commit
2e19b78b8d
1 changed files with 15 additions and 0 deletions
|
@ -69,6 +69,21 @@ final class PhabricatorProjectTransaction
|
||||||
return parent::getColor();
|
return parent::getColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldHide() {
|
||||||
|
switch ($this->getTransactionType()) {
|
||||||
|
case PhabricatorTransactions::TYPE_EDGE:
|
||||||
|
$edge_type = $this->getMetadataValue('edge:type');
|
||||||
|
switch ($edge_type) {
|
||||||
|
case PhabricatorProjectSilencedEdgeType::EDGECONST:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::shouldHide();
|
||||||
|
}
|
||||||
|
|
||||||
public function shouldHideForFeed() {
|
public function shouldHideForFeed() {
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
case self::TYPE_HASWORKBOARD:
|
case self::TYPE_HASWORKBOARD:
|
||||||
|
|
Loading…
Reference in a new issue