(teamName: string, paneId: string)
| 233 | * @returns true if the pane was added to hidden list, false if team doesn't exist |
| 234 | */ |
| 235 | export function addHiddenPaneId(teamName: string, paneId: string): boolean { |
| 236 | const teamFile = readTeamFile(teamName) |
| 237 | if (!teamFile) { |
| 238 | return false |
| 239 | } |
| 240 | |
| 241 | const hiddenPaneIds = teamFile.hiddenPaneIds ?? [] |
| 242 | if (!hiddenPaneIds.includes(paneId)) { |
| 243 | hiddenPaneIds.push(paneId) |
| 244 | teamFile.hiddenPaneIds = hiddenPaneIds |
| 245 | writeTeamFile(teamName, teamFile) |
| 246 | logForDebugging( |
| 247 | `[TeammateTool] Added ${paneId} to hidden panes for team ${teamName}`, |
| 248 | ) |
| 249 | } |
| 250 | return true |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * Removes a pane ID from the hidden panes list in the team file. |
nothing calls this directly
no test coverage detected