Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle alerts in audio cue service, add List Alerts command and settings #201833

Merged
merged 24 commits into from Jan 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/vs/platform/audioCues/browser/audioCueService.ts
Expand Up @@ -268,8 +268,8 @@ class Cache<TArg, TValue> {
constructor(private readonly getValue: (value: TArg) => TValue) {
}

private _getKey(event: IAudioCueEvent): string {
return `${event.cue.name}-${event.userGesture}`;
private _getKey(arg: TArg): string {
return JSON.stringify(arg);
meganrogge marked this conversation as resolved.
Show resolved Hide resolved
}

public get(arg: TArg): TValue {
Expand All @@ -278,7 +278,7 @@ class Cache<TArg, TValue> {
}

const value = this.getValue(arg);
const key = this._getKey(arg as IAudioCueEvent) as TArg;
const key = this._getKey(arg) as TArg;
this.map.set(key, value);
return value;
}
Expand Down