Skip to content

Commit 6a2cd56

Browse files
author
Akos Kitta
committed
fix: defer info message + reword
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 4ae6e9f commit 6a2cd56

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

arduino-ide-extension/src/browser/theia/monaco/monaco-theming-service.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { MessageService } from '@theia/core/lib/common/message-service';
88
import { nls } from '@theia/core/lib/common/nls';
99
import { deepClone } from '@theia/core/lib/common/objects';
10+
import { wait } from '@theia/core/lib/common/promise-util';
1011
import { inject, injectable } from '@theia/core/shared/inversify';
1112
import {
1213
MonacoThemeState,
@@ -197,11 +198,15 @@ export class CleanupObsoleteThemes implements FrontendApplicationContribution {
197198
compatibleBuiltInTheme(currentTheme).id,
198199
true
199200
);
200-
this.messageService.info(
201-
nls.localize(
202-
'arduino/theme/currentThemeNotFound',
203-
'Could not find the currently selected theme: {0}. Arduino IDE has selected a compatible official theme.',
204-
currentTheme.label
201+
wait(250).then(() =>
202+
requestAnimationFrame(() =>
203+
this.messageService.info(
204+
nls.localize(
205+
'arduino/theme/currentThemeNotFound',
206+
'Could not load the currently selected theme: {0}. Arduino IDE has picked a compatible official theme.',
207+
currentTheme.label
208+
)
209+
)
205210
)
206211
);
207212
}

i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
"surveyMessage": "Please help us improve by answering this super short survey. We value our community and would like to get to know our supporters a little better."
468468
},
469469
"theme": {
470-
"currentThemeNotFound": "Could not find the currently selected theme: {0}. Arduino IDE has selected a compatible official theme.",
470+
"currentThemeNotFound": "Could not load the currently selected theme: {0}. Arduino IDE has picked a compatible official theme.",
471471
"dark": "Dark",
472472
"hc": "High Contrast",
473473
"light": "Light",

0 commit comments

Comments
 (0)