Skip to content

Commit a85a898

Browse files
committed
Fully delete keybindingManager, since it's not doing anything anymore
1 parent d934f24 commit a85a898

File tree

7 files changed

+2
-61
lines changed

7 files changed

+2
-61
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,7 @@ export const modalOpened: Action<{
8888
}
8989
};
9090

91-
export const modalClosed: Action = ({ state, effects }) => {
92-
// We just start it whenever it closes, if already started nothing happens
93-
if (state.currentModal === 'preferences') {
94-
effects.keybindingManager.start();
95-
}
96-
91+
export const modalClosed: Action = ({ state }) => {
9792
state.currentModal = null;
9893
};
9994

packages/app/src/app/overmind/effects/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export { default as api } from './api';
44
export { default as browser } from './browser';
55
export { default as connection } from './connection';
66
export { default as jsZip } from './jsZip';
7-
export { default as keybindingManager } from './keybindingManager';
87
export { default as live } from './live';
98
export { default as moduleRecover } from './moduleRecover';
109
export { default as notifications } from './notifications';

packages/app/src/app/overmind/effects/keybindingManager.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

packages/app/src/app/overmind/factories.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Contributor } from '@codesandbox/common/lib/types';
2-
import { IDerive, IState, json } from 'overmind';
2+
import { IDerive, IState } from 'overmind';
33

44
import { AsyncAction } from '.';
55

@@ -25,10 +25,6 @@ export const withLoadApp = <T>(
2525

2626
effects.connection.addListener(actions.connectionChanged);
2727
actions.internal.setStoredSettings();
28-
effects.keybindingManager.set(
29-
json(state.preferences.settings.keybindings || [])
30-
);
31-
effects.keybindingManager.start();
3228
effects.codesandboxApi.listen(actions.server.onCodeSandboxAPIMessage);
3329

3430
if (state.jwt) {

packages/app/src/app/overmind/internalActions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export const closeModals: Action<boolean> = ({ state, effects }, isKeyDown) => {
166166
}
167167

168168
state.currentModal = null;
169-
effects.keybindingManager.start();
170169
};
171170

172171
export const setCurrentSandbox: AsyncAction<Sandbox> = async (

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Badge } from '@codesandbox/common/lib/types';
2-
import { json } from 'overmind';
32

43
import { Action, AsyncAction } from 'app/overmind';
54

@@ -24,12 +23,6 @@ export const itemIdChanged: AsyncAction<{
2423
}> = async ({ state, actions, effects }, { itemId }) => {
2524
state.preferences.itemId = itemId;
2625

27-
if (itemId === 'keybindings') {
28-
effects.keybindingManager.pause();
29-
} else {
30-
effects.keybindingManager.start();
31-
}
32-
3326
if (itemId === 'integrations') {
3427
await actions.deployment.internal.getZeitUserDetails();
3528
}
@@ -125,8 +118,6 @@ export const keybindingChanged: Action<{
125118
);
126119

127120
effects.settingsStore.set('keybindings', keybindingsValue);
128-
129-
effects.keybindingManager.set(json(state.preferences.settings.keybindings));
130121
};
131122

132123
export const zenModeToggled: Action = ({ state }) => {

packages/app/src/app/overmind/onInitialize.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export const onInitialize: OnInitialize = async (
1919

2020
effects.flows.initialize(overmindInstance.reaction);
2121

22-
effects.keybindingManager.initialize();
23-
2422
effects.api.initialize({
2523
provideJwtToken,
2624
getParsedConfigurations() {

0 commit comments

Comments
 (0)