( projectExpandedById: Readonly<Record<string, boolean>>, preferenceKeys: readonly string[], )
| 335 | } |
| 336 | |
| 337 | export function resolveProjectExpanded( |
| 338 | projectExpandedById: Readonly<Record<string, boolean>>, |
| 339 | preferenceKeys: readonly string[], |
| 340 | ): boolean { |
| 341 | for (const key of preferenceKeys) { |
| 342 | const expanded = projectExpandedById[key]; |
| 343 | if (expanded !== undefined) { |
| 344 | return expanded; |
| 345 | } |
| 346 | } |
| 347 | return projectExpandedById[LEGACY_PROJECT_EXPANSION_DEFAULT_KEY] ?? true; |
| 348 | } |
| 349 | |
| 350 | export function setProjectExpanded( |
| 351 | state: UiState, |
no outgoing calls
no test coverage detected