Skip to content

Commit

Permalink
Revert "When having details for non modal, show more which shows moda…
Browse files Browse the repository at this point in the history
…l... #125750"

This reverts commit fbe6292.
  • Loading branch information
jrieken committed Jun 17, 2021
1 parent 4b537c8 commit c24879b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,8 @@ declare module 'vscode' {
modal?: boolean;

/**
* Human-readable detail message that is rendered less prominent.
* Human-readable detail message that is rendered less prominent. _Note_ that detail
* is only shown for {@link MessageOptions.modal modal} messages.
*/
detail?: string;
}
Expand Down
10 changes: 2 additions & 8 deletions src/vs/workbench/api/browser/mainThreadMessageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export class MainThreadMessageService implements MainThreadMessageServiceShape {
if (options.modal) {
return this._showModalMessage(severity, message, options.detail, commands, options.useCustom);
} else {
return this._showNotificationMessage(severity, message, options.detail, commands, options.extension);
return this._showMessage(severity, message, commands, options.extension);
}
}

private _showNotificationMessage(severity: Severity, message: string, detail: string | undefined, commands: { title: string; isCloseAffordance: boolean; handle: number; }[], extension: IExtensionDescription | undefined): Promise<number | undefined> {
private _showMessage(severity: Severity, message: string, commands: { title: string; isCloseAffordance: boolean; handle: number; }[], extension: IExtensionDescription | undefined): Promise<number | undefined> {

return new Promise<number | undefined>(resolve => {

Expand All @@ -66,12 +66,6 @@ export class MainThreadMessageService implements MainThreadMessageServiceShape {
primaryActions.push(new MessageItemAction('_extension_message_handle_' + command.handle, command.title, command.handle));
});

if (detail) {
primaryActions.push(new Action('more', nls.localize('details', "More"), undefined, true, () => {
this._showModalMessage(severity, message, detail, commands, false);
}));
}

let source: string | { label: string, id: string } | undefined;
if (extension) {
source = {
Expand Down

0 comments on commit c24879b

Please sign in to comment.