@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add user icons / colors for subscriber transactions

Summary: Adds additional icon states for subscriber transactions. Also updated "eraser" to "trash" (man that icon is bad).

Test Plan: add a subscriber, remove a subscriber.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13800

+29 -2
+29 -2
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 362 362 case PhabricatorTransactions::TYPE_COMMENT: 363 363 $comment = $this->getComment(); 364 364 if ($comment && $comment->getIsRemoved()) { 365 - return 'fa-eraser'; 365 + return 'fa-trash'; 366 366 } 367 367 return 'fa-comment'; 368 368 case PhabricatorTransactions::TYPE_SUBSCRIBERS: 369 - return 'fa-envelope'; 369 + $old = $this->getOldValue(); 370 + $new = $this->getNewValue(); 371 + $add = array_diff($new, $old); 372 + $rem = array_diff($old, $new); 373 + if ($add && $rem) { 374 + return 'fa-user'; 375 + } else if ($add) { 376 + return 'fa-user-plus'; 377 + } else if ($rem) { 378 + return 'fa-user-times'; 379 + } else { 380 + return 'fa-user'; 381 + } 370 382 case PhabricatorTransactions::TYPE_VIEW_POLICY: 371 383 case PhabricatorTransactions::TYPE_EDIT_POLICY: 372 384 case PhabricatorTransactions::TYPE_JOIN_POLICY: ··· 416 428 return 'red'; 417 429 } 418 430 break; 431 + case PhabricatorTransactions::TYPE_SUBSCRIBERS: 432 + $old = $this->getOldValue(); 433 + $new = $this->getNewValue(); 434 + $add = array_diff($new, $old); 435 + $rem = array_diff($old, $new); 436 + if ($add && $rem) { 437 + return 'green'; 438 + } else if ($add) { 439 + return 'green'; 440 + } else if ($rem) { 441 + return 'black'; 442 + } else { 443 + return null; 444 + } 445 + break; 419 446 } 420 447 return null; 421 448 }