From: Dessalines Date: Fri, 29 Oct 2021 18:55:14 +0000 (-0400) Subject: Use community title and user display name for dropdown. X-Git-Url: http://these/git/%7B%60/feeds/c/%24%7Bthis.state.communityName%7D.xml?a=commitdiff_plain;h=bfb43aae77dd4bd38e41a336bec02d87d7bb4627;p=lemmy-ui.git Use community title and user display name for dropdown. --- diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 1167295..92b42fb 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1465,13 +1465,12 @@ export const choicesConfig = { export function communitySelectName(cv: CommunityView): string { return cv.community.local ? cv.community.title - : `${hostname(cv.community.actor_id)}/${cv.community.name}`; + : `${hostname(cv.community.actor_id)}/${cv.community.title}`; } export function personSelectName(pvs: PersonViewSafe): string { - return pvs.person.local - ? pvs.person.display_name || pvs.person.name - : `${hostname(pvs.person.actor_id)}/${pvs.person.name}`; + let pName = pvs.person.display_name || pvs.person.name; + return pvs.person.local ? pName : `${hostname(pvs.person.actor_id)}/${pName}`; } export function initializeSite(site: GetSiteResponse) {