Skip to content

Commit c4172ee

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
fix: theme service binding
cleaned up unused symbol closes #1742 Signed-off-by: Akos Kitta <[email protected]>
1 parent ed8ed15 commit c4172ee

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

Diff for: arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ import { NewCloudSketch } from './contributions/new-cloud-sketch';
323323
import { SketchbookCompositeWidget } from './widgets/sketchbook/sketchbook-composite-widget';
324324
import { WindowTitleUpdater } from './theia/core/window-title-updater';
325325
import { WindowTitleUpdater as TheiaWindowTitleUpdater } from '@theia/core/lib/browser/window/window-title-updater';
326-
import { ThemeService } from './theia/core/theming';
327-
import { ThemeService as TheiaThemeService } from '@theia/core/lib/browser/theming';
326+
import { ThemeServiceWithDB } from './theia/core/theming';
327+
import { ThemeServiceWithDB as TheiaThemeServiceWithDB } from '@theia/monaco/lib/browser/monaco-indexed-db';
328328
import { MonacoThemingService } from './theia/monaco/monaco-theming-service';
329329
import { MonacoThemingService as TheiaMonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service';
330330
import { TypeHierarchyServiceProvider } from './theia/typehierarchy/type-hierarchy-service';
@@ -959,8 +959,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
959959
rebind(TheiaWindowTitleUpdater).toService(WindowTitleUpdater);
960960

961961
// register Arduino themes
962-
bind(ThemeService).toSelf().inSingletonScope();
963-
rebind(TheiaThemeService).toService(ThemeService);
962+
bind(ThemeServiceWithDB).toSelf().inSingletonScope();
963+
rebind(TheiaThemeServiceWithDB).toService(ThemeServiceWithDB);
964964
bind(MonacoThemingService).toSelf().inSingletonScope();
965965
rebind(TheiaMonacoThemingService).toService(MonacoThemingService);
966966

Diff for: arduino-ide-extension/src/browser/theia/core/theming.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { ThemeService as TheiaThemeService } from '@theia/core/lib/browser/theming';
21
import type { Theme } from '@theia/core/lib/common/theme';
32
import { injectable } from '@theia/core/shared/inversify';
3+
import { ThemeServiceWithDB as TheiaThemeServiceWithDB } from '@theia/monaco/lib/browser/monaco-indexed-db';
44

55
export namespace ArduinoThemes {
66
export const Light: Theme = {
@@ -18,7 +18,7 @@ export namespace ArduinoThemes {
1818
}
1919

2020
@injectable()
21-
export class ThemeService extends TheiaThemeService {
21+
export class ThemeServiceWithDB extends TheiaThemeServiceWithDB {
2222
protected override init(): void {
2323
this.register(ArduinoThemes.Light, ArduinoThemes.Dark);
2424
super.init();

Diff for: arduino-ide-extension/src/browser/utils/window.ts

-8
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,3 @@
55
export function setURL(url: URL, data: any = {}): void {
66
history.pushState(data, '', url);
77
}
8-
9-
/**
10-
* If available from the `window` object, then it means, the IDE2 has successfully patched the `MonacoThemingService#init` static method,
11-
* and can wait the custom theme registration.
12-
*/
13-
export const MonacoThemeServiceIsReady = Symbol(
14-
'@arduino-ide#monaco-theme-service-is-ready'
15-
);

0 commit comments

Comments
 (0)