Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/1072/head
Maxence Lange 2020-10-13 16:51:56 -01:00
rodzic b56d4fe24b
commit de67f15f6d
2 zmienionych plików z 4 dodań i 7 usunięć

Wyświetl plik

@ -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);
}
/**

Wyświetl plik

@ -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
);
}