summaryrefslogtreecommitdiffstats
path: root/models/activities
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-02 16:30:18 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-06 05:10:46 +0100
commitbe9189eddc84e942710b16b1c8c54c10aad01b63 (patch)
tree607b2ad0478619d75e76ad13379995e6100241d1 /models/activities
parentMake PR form use toast to show error message (#29545) (diff)
downloadforgejo-be9189eddc84e942710b16b1c8c54c10aad01b63.tar.xz
forgejo-be9189eddc84e942710b16b1c8c54c10aad01b63.zip
Rename Action.GetDisplayName to GetActDisplayName (#29540)
To avoid conflicting with User.GetDisplayName, because there is no data type in template. And it matches other methods like GetActFullName / GetActUserName (cherry picked from commit 3f081d4b54261c1b4ee4f1df40c610fdd9581ef2)
Diffstat (limited to 'models/activities')
-rw-r--r--models/activities/action.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/activities/action.go b/models/activities/action.go
index 8cb32f6889..6df113138b 100644
--- a/models/activities/action.go
+++ b/models/activities/action.go
@@ -227,8 +227,8 @@ func (a *Action) ShortActUserName(ctx context.Context) string {
return base.EllipsisString(a.GetActUserName(ctx), 20)
}
-// GetDisplayName gets the action's display name based on DEFAULT_SHOW_FULL_NAME, or falls back to the username if it is blank.
-func (a *Action) GetDisplayName(ctx context.Context) string {
+// GetActDisplayName gets the action's display name based on DEFAULT_SHOW_FULL_NAME, or falls back to the username if it is blank.
+func (a *Action) GetActDisplayName(ctx context.Context) string {
if setting.UI.DefaultShowFullName {
trimmedFullName := strings.TrimSpace(a.GetActFullName(ctx))
if len(trimmedFullName) > 0 {
@@ -238,8 +238,8 @@ func (a *Action) GetDisplayName(ctx context.Context) string {
return a.ShortActUserName(ctx)
}
-// GetDisplayNameTitle gets the action's display name used for the title (tooltip) based on DEFAULT_SHOW_FULL_NAME
-func (a *Action) GetDisplayNameTitle(ctx context.Context) string {
+// GetActDisplayNameTitle gets the action's display name used for the title (tooltip) based on DEFAULT_SHOW_FULL_NAME
+func (a *Action) GetActDisplayNameTitle(ctx context.Context) string {
if setting.UI.DefaultShowFullName {
return a.ShortActUserName(ctx)
}