fix(user): show worn badge in comments

This commit is contained in:
2026-08-11 19:45:31 +08:00
parent 9781369b6b
commit bdbd85e434
2 changed files with 42 additions and 17 deletions
+6 -1
View File
@@ -60,7 +60,12 @@ if (!function_exists('aksrt_render_user_identity_chips')) {
$priority = ['verify' => 0, 'badge' => 1, 'level' => 2];
return ($priority[(string) ($left['type'] ?? '')] ?? 3) <=> ($priority[(string) ($right['type'] ?? '')] ?? 3);
});
// Comments stay compact; author/card can show more.
if ($context === 'comment') {
$signals = array_values(array_filter($signals, static function (array $signal): bool {
return (string) ($signal['type'] ?? '') !== 'badge' || !empty($signal['wear']);
}));
}
// Comments stay compact; author/card can show more.
$limit = $context === 'comment' ? 3 : 6;
$n = 0;
foreach ($signals as $signal) {