kopia lustrzana https://github.com/nextcloud/social
display avatar
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/1072/head
rodzic
b56d4fe24b
commit
de67f15f6d
|
@ -210,11 +210,7 @@ class ACore extends Item implements JsonSerializable {
|
|||
* @return bool
|
||||
*/
|
||||
public function hasIcon(): bool {
|
||||
if ($this->icon === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return ($this->icon !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -217,12 +217,13 @@ class UnifiedSearchProvider implements IProvider {
|
|||
private function convertAccounts(array $accounts): array {
|
||||
$result = [];
|
||||
foreach ($accounts as $account) {
|
||||
$icon = ($account->hasIcon()) ? $account->getIcon()->getUrl() : '';
|
||||
$result[] = new UnifiedSearchResult(
|
||||
$account->getAvatar(),
|
||||
$icon,
|
||||
$account->getPreferredUsername(),
|
||||
'@' . $account->getAccount(),
|
||||
$account->getUrl(),
|
||||
$account->getAvatar()
|
||||
$icon
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue