diff options
Diffstat (limited to 'packages/main/src/stores/MainStore.ts')
-rw-r--r-- | packages/main/src/stores/MainStore.ts | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/packages/main/src/stores/MainStore.ts b/packages/main/src/stores/MainStore.ts index d717bed..9affbd0 100644 --- a/packages/main/src/stores/MainStore.ts +++ b/packages/main/src/stores/MainStore.ts | |||
@@ -18,9 +18,9 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import type { Action, BrowserViewBounds } from '@sophie/shared'; | 21 | import type { Action } from '@sophie/shared'; |
22 | import type { ResourceKey } from 'i18next'; | 22 | import type { ResourceKey } from 'i18next'; |
23 | import { applySnapshot, flow, Instance, types } from 'mobx-state-tree'; | 23 | import { flow, Instance, types } from 'mobx-state-tree'; |
24 | 24 | ||
25 | import type I18nStore from '../i18n/I18nStore'; | 25 | import type I18nStore from '../i18n/I18nStore'; |
26 | import type { UseTranslationResult } from '../i18n/I18nStore'; | 26 | import type { UseTranslationResult } from '../i18n/I18nStore'; |
@@ -37,15 +37,6 @@ const log = getLogger('MainStore'); | |||
37 | 37 | ||
38 | const MainStore = types | 38 | const MainStore = types |
39 | .model('MainStore', { | 39 | .model('MainStore', { |
40 | browserViewBounds: types.optional( | ||
41 | types.model('BrowserViewBounds', { | ||
42 | x: 0, | ||
43 | y: 0, | ||
44 | width: 0, | ||
45 | height: 0, | ||
46 | }), | ||
47 | {}, | ||
48 | ), | ||
49 | shared: types.optional(SharedStore, {}), | 40 | shared: types.optional(SharedStore, {}), |
50 | i18n: types.frozen<I18nStore | undefined>(), | 41 | i18n: types.frozen<I18nStore | undefined>(), |
51 | }) | 42 | }) |
@@ -83,9 +74,6 @@ const MainStore = types | |||
83 | }), | 74 | }), |
84 | ) | 75 | ) |
85 | .actions((self) => ({ | 76 | .actions((self) => ({ |
86 | setBrowserViewBounds(bounds: BrowserViewBounds): void { | ||
87 | applySnapshot(self.browserViewBounds, bounds); | ||
88 | }, | ||
89 | setMainWindow(mainWindow: MainWindow | undefined): void { | 77 | setMainWindow(mainWindow: MainWindow | undefined): void { |
90 | self.mainWindow = mainWindow; | 78 | self.mainWindow = mainWindow; |
91 | }, | 79 | }, |
@@ -121,9 +109,6 @@ const MainStore = types | |||
121 | .actions((self) => ({ | 109 | .actions((self) => ({ |
122 | dispatch(action: Action): void { | 110 | dispatch(action: Action): void { |
123 | switch (action.action) { | 111 | switch (action.action) { |
124 | case 'set-browser-view-bounds': | ||
125 | self.setBrowserViewBounds(action.browserViewBounds); | ||
126 | break; | ||
127 | case 'set-selected-service-id': | 112 | case 'set-selected-service-id': |
128 | self.settings.setSelectedServiceId(action.serviceId); | 113 | self.settings.setSelectedServiceId(action.serviceId); |
129 | break; | 114 | break; |