Avoid loading and twisty codicons set at the same time by aeschli · Pull Request #95915 · microsoft/vscode
The reason for #95878 was that the loading codicon class name is set together with the twisty codicon class name.
That works as long as the CSS for the loading codicon is defined after the twisty CSS.
We want to avoid to depend on the CSS definition order. Instead, the PR nakes sure that only one icon class name is set at a time.
The fix changes the ITreeRenderer.renderTwistie API by adding a boolean return type.
renderTwistie returns true when renderTwistie has rendered a twisty, or false if not.
The tree will only draw the regular twisty if renderTwistie has not already done so.
Alternative would be to change the API to:
getTwistie?(element: T): Codicon | undefined;