Fix sorting start entry contributions
This commit is contained in:
parent
8a1e7de8f5
commit
ee6587fc10
1 changed files with 2 additions and 3 deletions
|
@ -670,9 +670,8 @@ export class GettingStartedService extends Disposable implements IGettingStarted
|
|||
}
|
||||
|
||||
private registerNewMenuItem(categoryDescriptor: IGettingStartedNewMenuEntryDescriptor) {
|
||||
let insertIndex = (this.newMenuItems.findIndex(entry => categoryDescriptor.category < entry.category));
|
||||
if (insertIndex === -1) { insertIndex = this.newMenuItems.length; }
|
||||
this.newMenuItems.splice(insertIndex, 0, categoryDescriptor);
|
||||
this.newMenuItems.push(categoryDescriptor);
|
||||
this.newMenuItems.sort((a, b) => b.category - a.category);
|
||||
this._onDidAddNewEntry.fire();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue