(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})
| 302 | } |
| 303 | |
| 304 | export async function getDisplayName(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) { |
| 305 | return loadCachedValue({ |
| 306 | key: "displayName", |
| 307 | legacyFields: ["name"], |
| 308 | forceRefresh: isRefresh, |
| 309 | priority, |
| 310 | load: async () => { |
| 311 | const displayName = await apiJson(GET_DISPLAY_NAME, { |
| 312 | allowUnauthorized: true, |
| 313 | fetchPriority: priority, |
| 314 | }); |
| 315 | return displayName.name; |
| 316 | }, |
| 317 | }); |
| 318 | } |
| 319 | |
| 320 | export async function setDisplayName(displayName) { |
| 321 | if (!displayName) { |
no test coverage detected