Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alvsan09 committed Nov 17, 2021
1 parent c8c5a6d commit 5d950c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/monaco/src/browser/monaco-quick-input-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class MonacoQuickInputService implements QuickInputService {
if (index !== -1) {
const filteredItems = wrapped.items.slice();
const removed = filteredItems.splice(index, 1);
const activeFilteredItems = wrapped.activeItems.filter(ai => ai !== removed[0]);
const activeFilteredItems = wrapped.activeItems.filter(item => item !== removed[0]);
wrapped.items = filteredItems;
if (activeFilteredItems) {
wrapped.activeItems = activeFilteredItems;
Expand Down
7 changes: 1 addition & 6 deletions packages/workspace/src/browser/quick-open-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ export class QuickOpenWorkspace {
]);
const home = new URI(homeDirUri).path.toString();
await this.preferences.ready;
if (!workspaces.length) {
this.items.push({
label: nls.localize('theia/windowActions/noRecentWorkSpaces', 'No Recent Workspaces')
});
}
this.items.push({
type: 'separator',
label: nls.localizeByDefault('folders & workspaces')
Expand Down Expand Up @@ -95,7 +90,7 @@ export class QuickOpenWorkspace {
}
this.quickInputService?.showQuickPick(this.items, {
placeholder: nls.localize(
'theia/windowActions/openRecentPlaceholder',
'vscode/windowActions/openRecentPlaceholder',
'Type the name of the workspace you want to open'),
onDidTriggerItemButton: async context => {
const resource = context.item.resource;
Expand Down
6 changes: 3 additions & 3 deletions packages/workspace/src/node/default-workspace-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export class DefaultWorkspaceServer implements WorkspaceServer {
const index = recentRoots.indexOf(uri);
if (index !== -1) {
recentRoots.splice(index, 1);
this.writeToUserHome({
recentRoots
});
}
this.writeToUserHome({
recentRoots
});
}

async getRecentWorkspaces(): Promise<string[]> {
Expand Down

0 comments on commit 5d950c5

Please sign in to comment.