Skip to content

Commit 35c8588

Browse files
committed
More hackiness
1 parent a518cfa commit 35c8588

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

packages/app/src/app/overmind/namespaces/editor/actions.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,27 @@ export const sandboxChanged: AsyncAction<{ id: string }> = withLoadApp<{
8888
state.editor.notFound = false;
8989
state.editor.currentId = newId;
9090

91+
effects.vscode.changeSandbox(
92+
{
93+
modules: [
94+
{
95+
id: 'optimistic',
96+
shortid: 'optimistic',
97+
code: 'Loading Sandbox...',
98+
title: 'Untitled',
99+
directoryShortid: null,
100+
},
101+
],
102+
directories: [],
103+
},
104+
fs => {
105+
state.editor.modulesByPath = fs;
106+
}
107+
);
108+
91109
try {
110+
actions.workspace.openDefaultItem();
111+
92112
const sandbox = await effects.api.getSandbox(newId);
93113

94114
actions.internal.setCurrentSandbox(sandbox);

packages/app/src/app/overmind/namespaces/editor/state.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ export const state: State = {
137137
modules: [],
138138
directories: [],
139139
privacy: 0,
140+
forkCount: 0,
141+
likeCount: 0,
142+
viewCount: 0,
143+
externalResources: [],
140144
};
141145
},
142146
isAllModulesSynced: ({ changedModuleShortids }) =>

0 commit comments

Comments
 (0)