mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 10:28:32 +00:00
Close core error notification on subsequent action
Closes #1154 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
||||
import {
|
||||
import type {
|
||||
Message,
|
||||
ProgressMessage,
|
||||
ProgressUpdate,
|
||||
} from '@theia/core/lib/common/message-service-protocol';
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { NotificationManager as TheiaNotificationManager } from '@theia/messages/lib/browser/notifications-manager';
|
||||
|
||||
@injectable()
|
||||
@@ -34,7 +35,9 @@ export class NotificationManager extends TheiaNotificationManager {
|
||||
this.fireUpdatedEvent();
|
||||
}
|
||||
|
||||
protected override toPlainProgress(update: ProgressUpdate): number | undefined {
|
||||
protected override toPlainProgress(
|
||||
update: ProgressUpdate
|
||||
): number | undefined {
|
||||
if (!update.work) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -43,4 +46,11 @@ export class NotificationManager extends TheiaNotificationManager {
|
||||
}
|
||||
return Math.min((update.work.done / update.work.total) * 100, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* For `public` visibility.
|
||||
*/
|
||||
override getMessageId(message: Message): string {
|
||||
return super.getMessageId(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user