(id: UniqueId | UniqueId[])
| 119 | ); |
| 120 | } |
| 121 | public remove(id: UniqueId | UniqueId[]): void { |
| 122 | const ids = Array.isArray(id) ? id : [id]; |
| 123 | |
| 124 | const { data = [] } = this.state; |
| 125 | ids.forEach((problemId) => { |
| 126 | const index = data.findIndex(searchById(problemId)); |
| 127 | if (index > -1) { |
| 128 | data.splice(index, 1); |
| 129 | } else { |
| 130 | logger.error( |
| 131 | `Remove problems failed, because there is no problem found via ${problemId}` |
| 132 | ); |
| 133 | } |
| 134 | }); |
| 135 | |
| 136 | this.setState( |
| 137 | { |
| 138 | data: [...data], |
| 139 | }, |
| 140 | () => { |
| 141 | this.updateStatusBar(); |
| 142 | } |
| 143 | ); |
| 144 | } |
| 145 | |
| 146 | public reset(): void { |
| 147 | const { builtInStatusProblems } = this.builtinService.getModules(); |
nothing calls this directly
no test coverage detected