提交 4529dd40 编写于 作者: B Benjamin Pasero

File icons were not updated (fixes #26526)

上级 d6e80052
......@@ -60,7 +60,7 @@ export class ResourceLabel extends IconLabel {
}
public setLabel(label: IEditorLabel, options?: IResourceLabelOptions): void {
const hasResourceChanged = this.hasResourceChanged(label);
const hasResourceChanged = this.hasResourceChanged(label, options);
this.label = label;
this.options = options;
......@@ -68,10 +68,17 @@ export class ResourceLabel extends IconLabel {
this.render(hasResourceChanged);
}
private hasResourceChanged(label: IEditorLabel): boolean {
private hasResourceChanged(label: IEditorLabel, options: IResourceLabelOptions): boolean {
const newResource = label ? label.resource : void 0;
const oldResource = this.label ? this.label.resource : void 0;
const newIsFolder = options ? options.isFolder : false;
const oldIsFolder = this.options ? this.options.isFolder : false;
if (newIsFolder !== oldIsFolder) {
return true; // same resource but different kind (file, folder)
}
if (newResource && oldResource) {
return newResource.toString() !== oldResource.toString();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册