Refactor label.IsArchived() (#29750)

just some missed nits
This commit is contained in:
6543
2024-03-13 07:04:07 +01:00
committed by GitHub
parent 857243bed7
commit 9a93b1816e
3 changed files with 12 additions and 15 deletions

View File

@ -124,7 +124,6 @@ func RenderLabel(ctx context.Context, locale translation.Locale, label *issues_m
var (
archivedCSSClass string
textColor = "#111"
isArchived = !label.ArchivedUnix.IsZero()
labelScope = label.ExclusiveScope()
)
@ -136,7 +135,7 @@ func RenderLabel(ctx context.Context, locale translation.Locale, label *issues_m
description := emoji.ReplaceAliases(template.HTMLEscapeString(label.Description))
if isArchived {
if label.IsArchived() {
archivedCSSClass = "archived-label"
description = fmt.Sprintf("(%s) %s", locale.TrString("archived"), description)
}