Skip to content

Commit

Permalink
Use 'viewId' as progress location
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Nov 2, 2020
1 parent bdc9aa2 commit 796f040
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/plugin-ext/src/plugin/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ export class NotificationExtImpl implements NotificationExt {
return progress;
}

protected mapLocation(pluginLocation: ProgressLocation): string | undefined {
switch (pluginLocation) {
protected mapLocation(location: ProgressLocation | { viewId: string }): string | undefined {
if (typeof location === 'object' && location.viewId) {
return location.viewId;
}

switch (location) {
case ProgressLocation.Notification: return 'notification';
case ProgressLocation.SourceControl: return 'scm';
case ProgressLocation.Window: return 'window';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4151,7 +4151,7 @@ declare module '@theia/plugin' {
/**
* The location at which progress should show.
*/
location: ProgressLocation;
location: ProgressLocation | { viewId: string };
/**
* A human-readable string which will be used to describe the
* operation.
Expand Down

0 comments on commit 796f040

Please sign in to comment.