Skip to content

Commit b0d77a8

Browse files
authored
fix previewenv to use services.object instead of services.ObjectService (#3067)
1 parent b1d7f42 commit b0d77a8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

frontend/app/view/preview/preview-model.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ export class PreviewModel implements ViewModel {
587587
return;
588588
}
589589
const blockOref = WOS.makeORef("block", this.blockId);
590-
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, updateMeta);
590+
await this.env.services.object.UpdateObjectMeta(blockOref, updateMeta);
591591

592592
// Clear the saved file buffers
593593
globalStore.set(this.fileContentSaved, null);
@@ -623,7 +623,7 @@ export class PreviewModel implements ViewModel {
623623
}
624624
updateMeta.edit = false;
625625
const blockOref = WOS.makeORef("block", this.blockId);
626-
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, updateMeta);
626+
await this.env.services.object.UpdateObjectMeta(blockOref, updateMeta);
627627
}
628628

629629
async goHistoryForward() {
@@ -635,13 +635,13 @@ export class PreviewModel implements ViewModel {
635635
}
636636
updateMeta.edit = false;
637637
const blockOref = WOS.makeORef("block", this.blockId);
638-
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, updateMeta);
638+
await this.env.services.object.UpdateObjectMeta(blockOref, updateMeta);
639639
}
640640

641641
async setEditMode(edit: boolean) {
642642
const blockMeta = globalStore.get(this.blockAtom)?.meta;
643643
const blockOref = WOS.makeORef("block", this.blockId);
644-
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, { ...blockMeta, edit });
644+
await this.env.services.object.UpdateObjectMeta(blockOref, { ...blockMeta, edit });
645645
}
646646

647647
async handleFileSave() {
@@ -790,7 +790,7 @@ export class PreviewModel implements ViewModel {
790790
click: () =>
791791
fireAndForget(async () => {
792792
const blockOref = WOS.makeORef("block", this.blockId);
793-
await this.env.services.ObjectService.UpdateObjectMeta(blockOref, {
793+
await this.env.services.object.UpdateObjectMeta(blockOref, {
794794
"editor:wordwrap": !wordWrap,
795795
});
796796
}),

frontend/app/view/preview/previewenv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type PreviewEnv = WaveEnvSubset<{
2626
fullConfigAtom: WaveEnv["atoms"]["fullConfigAtom"];
2727
};
2828
services: {
29-
ObjectService: WaveEnv["services"]["ObjectService"];
29+
object: WaveEnv["services"]["object"];
3030
};
3131
wos: WaveEnv["wos"];
3232
getSettingsKeyAtom: SettingsKeyAtomFnType<"preview:showhiddenfiles" | "editor:fontsize" | "preview:defaultsort">;

0 commit comments

Comments
 (0)