From 3aed8ae03475a430c0dc8e33f42fa9269a4844bd Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Fri, 2 Feb 2024 19:01:11 +0900 Subject: [PATCH] Fix default avatar image size in PR diff page (#28971) Fix #28941 ps: didn't test. The repo is too big to migrate. --- modules/templates/util_avatar.go | 2 +- templates/repo/diff/comments.tmpl | 2 +- templates/repo/issue/view_content.tmpl | 2 +- templates/repo/issue/view_content/comments.tmpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/templates/util_avatar.go b/modules/templates/util_avatar.go index 462668588a..85832cf264 100644 --- a/modules/templates/util_avatar.go +++ b/modules/templates/util_avatar.go @@ -59,7 +59,7 @@ func (au *AvatarUtils) Avatar(item any, others ...any) template.HTML { } } - return "" + return AvatarHTML(avatars.DefaultAvatarLink(), size, class, "") } // AvatarByAction renders user avatars from action. args: action, size (int), class (string) diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 1e9af5c4a1..2fbfe2fd6a 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -3,7 +3,7 @@ {{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}