Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2884627
D25730.1737164057.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25730.1737164057.diff
View Options
diff --git a/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php b/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
--- a/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
+++ b/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
@@ -94,26 +94,33 @@
}
}
- $mute_action = id(new PhabricatorActionView())
- ->setWorkflow(true)
- ->setHref('/subscriptions/mute/'.$object->getPHID().'/')
- ->setDisabled(!$user_phid);
-
- if (!$is_muted) {
- $mute_action
- ->setName(pht('Mute Notifications'))
- ->setIcon('fa-volume-up');
- } else {
- $mute_action
- ->setName(pht('Unmute Notifications'))
- ->setIcon('fa-volume-off')
- ->setColor(PhabricatorActionView::RED);
- }
-
-
$actions = $event->getValue('actions');
$actions[] = $sub_action;
- $actions[] = $mute_action;
+
+ // Hide "Mute Notifications" in sidebar if not supported by Editor - T15378
+ $supported_editor_transaction_types =
+ array_fill_keys($object->getApplicationTransactionEditor()
+ ->getTransactionTypesForObject($object), true);
+ if (array_key_exists(PhabricatorTransactions::TYPE_EDGE,
+ $supported_editor_transaction_types)) {
+ $mute_action = id(new PhabricatorActionView())
+ ->setWorkflow(true)
+ ->setHref('/subscriptions/mute/'.$object->getPHID().'/')
+ ->setDisabled(!$user_phid);
+
+ if (!$is_muted) {
+ $mute_action
+ ->setName(pht('Mute Notifications'))
+ ->setIcon('fa-volume-up');
+ } else {
+ $mute_action
+ ->setName(pht('Unmute Notifications'))
+ ->setIcon('fa-volume-off')
+ ->setColor(PhabricatorActionView::RED);
+ }
+ $actions[] = $mute_action;
+ }
+
$event->setValue('actions', $actions);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 01:34 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1111747
Default Alt Text
D25730.1737164057.diff (1 KB)
Attached To
Mode
D25730: Avoid PhabricatorApplicationTransactionStructureException on editors not supporting Mute Notifications
Attached
Detach File
Event Timeline
Log In to Comment