diff options
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/Service.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/models/Service.js b/src/models/Service.js index 0d1dff431..d0c6a7103 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -4,7 +4,7 @@ import { webContents } from '@electron/remote'; | |||
4 | import normalizeUrl from 'normalize-url'; | 4 | import normalizeUrl from 'normalize-url'; |
5 | import path from 'path'; | 5 | import path from 'path'; |
6 | 6 | ||
7 | import { TODOS_RECIPE_ID, todosStore } from '../features/todos'; | 7 | import { todosStore } from '../features/todos'; |
8 | import { isValidExternalURL } from '../helpers/url-helpers'; | 8 | import { isValidExternalURL } from '../helpers/url-helpers'; |
9 | import UserAgent from './UserAgent'; | 9 | import UserAgent from './UserAgent'; |
10 | 10 | ||
@@ -184,8 +184,12 @@ export default class Service { | |||
184 | }; | 184 | }; |
185 | } | 185 | } |
186 | 186 | ||
187 | @computed get isTodosService() { | ||
188 | return this.recipe.id === todosStore.todoRecipeId; | ||
189 | } | ||
190 | |||
187 | get webview() { | 191 | get webview() { |
188 | if (this.recipe.id === TODOS_RECIPE_ID) { | 192 | if (this.isTodosService) { |
189 | return todosStore.webview; | 193 | return todosStore.webview; |
190 | } | 194 | } |
191 | 195 | ||
@@ -243,7 +247,6 @@ export default class Service { | |||
243 | return this.recipe.partition || `persist:service-${this.id}`; | 247 | return this.recipe.partition || `persist:service-${this.id}`; |
244 | } | 248 | } |
245 | 249 | ||
246 | |||
247 | initializeWebViewEvents({ handleIPCMessage, openWindow, stores }) { | 250 | initializeWebViewEvents({ handleIPCMessage, openWindow, stores }) { |
248 | const webviewWebContents = webContents.fromId(this.webview.getWebContentsId()); | 251 | const webviewWebContents = webContents.fromId(this.webview.getWebContentsId()); |
249 | 252 | ||