Shorten update import labels (#168250)

Fixes #165907

This aligns with the markdown update imports UI
This commit is contained in:
Matt Bierner
2022-12-06 16:09:05 -08:00
committed by GitHub
parent 9a8f118aa9
commit 16e7698751

View File

@@ -155,11 +155,11 @@ class UpdateImportsOnFileRenameHandler extends Disposable {
};
const alwaysItem: vscode.MessageItem = {
title: vscode.l10n.t("Always automatically update imports"),
title: vscode.l10n.t("Always"),
};
const neverItem: vscode.MessageItem = {
title: vscode.l10n.t("Never automatically update imports"),
title: vscode.l10n.t("Never"),
};
const response = await vscode.window.showInformationMessage(
@@ -185,15 +185,14 @@ class UpdateImportsOnFileRenameHandler extends Disposable {
this.getConfigTargetScope(config, updateImportsOnFileMoveName));
return true;
}
case neverItem:
{
const config = this.getConfiguration(newResources[0]);
config.update(
updateImportsOnFileMoveName,
UpdateImportsOnFileMoveSetting.Never,
this.getConfigTargetScope(config, updateImportsOnFileMoveName));
return false;
}
case neverItem: {
const config = this.getConfiguration(newResources[0]);
config.update(
updateImportsOnFileMoveName,
UpdateImportsOnFileMoveSetting.Never,
this.getConfigTargetScope(config, updateImportsOnFileMoveName));
return false;
}
default: {
return false;
}