Page MenuHomePhabricator

D15154.id36586.diff
No OneTemporary

D15154.id36586.diff

diff --git a/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php b/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php
--- a/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php
+++ b/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php
@@ -54,8 +54,10 @@
$icon_icon = PhabricatorPeopleIconSet::getIconIcon($icon_key);
$subtitle = $profile->getDisplayTitle();
- $handle->setIcon($icon_icon);
- $handle->setSubtitle($subtitle);
+ $handle
+ ->setIcon($icon_icon)
+ ->setSubtitle($subtitle)
+ ->setTokenIcon('fa-user');
}
$availability = null;
diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php
--- a/src/applications/phid/PhabricatorObjectHandle.php
+++ b/src/applications/phid/PhabricatorObjectHandle.php
@@ -28,6 +28,7 @@
private $objectName;
private $policyFiltered;
private $subtitle;
+ private $tokenIcon;
public function setIcon($icon) {
$this->icon = $icon;
@@ -86,6 +87,19 @@
return null;
}
+ public function setTokenIcon($icon) {
+ $this->tokenIcon = $icon;
+ return $this;
+ }
+
+ public function getTokenIcon() {
+ if ($this->tokenIcon !== null) {
+ return $this->tokenIcon;
+ }
+
+ return $this->getIcon();
+ }
+
public function getTypeIcon() {
if ($this->getPHIDType()) {
return $this->getPHIDType()->getTypeIcon();
diff --git a/src/applications/typeahead/view/PhabricatorTypeaheadTokenView.php b/src/applications/typeahead/view/PhabricatorTypeaheadTokenView.php
--- a/src/applications/typeahead/view/PhabricatorTypeaheadTokenView.php
+++ b/src/applications/typeahead/view/PhabricatorTypeaheadTokenView.php
@@ -32,7 +32,7 @@
$token = id(new PhabricatorTypeaheadTokenView())
->setKey($handle->getPHID())
->setValue($handle->getFullName())
- ->setIcon($handle->getIcon());
+ ->setIcon($handle->getTokenIcon());
if ($handle->isDisabled() ||
$handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) {

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 11:54 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7453298
Default Alt Text
D15154.id36586.diff (2 KB)

Event Timeline