diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-08 14:48:46 +0100 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-08 15:11:33 +0100 |
commit | cf9d7a30fed4fe50c346e652073464b07277a81e (patch) | |
tree | 449d2f6c5b68083cce7298355e612a30d43334c1 /src/stores | |
parent | correctly update services submenu on language change (diff) | |
download | ferdium-app-cf9d7a30fed4fe50c346e652073464b07277a81e.tar.gz ferdium-app-cf9d7a30fed4fe50c346e652073464b07277a81e.tar.zst ferdium-app-cf9d7a30fed4fe50c346e652073464b07277a81e.zip |
detach service when underlying webview unmounts
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index c63bef196..69e616f0c 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -44,6 +44,7 @@ export default class ServicesStore extends Store { | |||
44 | this.actions.service.deleteService.listen(this._deleteService.bind(this)); | 44 | this.actions.service.deleteService.listen(this._deleteService.bind(this)); |
45 | this.actions.service.clearCache.listen(this._clearCache.bind(this)); | 45 | this.actions.service.clearCache.listen(this._clearCache.bind(this)); |
46 | this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); | 46 | this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); |
47 | this.actions.service.detachService.listen(this._detachService.bind(this)); | ||
47 | this.actions.service.focusService.listen(this._focusService.bind(this)); | 48 | this.actions.service.focusService.listen(this._focusService.bind(this)); |
48 | this.actions.service.focusActiveService.listen(this._focusActiveService.bind(this)); | 49 | this.actions.service.focusActiveService.listen(this._focusActiveService.bind(this)); |
49 | this.actions.service.toggleService.listen(this._toggleService.bind(this)); | 50 | this.actions.service.toggleService.listen(this._toggleService.bind(this)); |
@@ -341,6 +342,11 @@ export default class ServicesStore extends Store { | |||
341 | service.isAttached = true; | 342 | service.isAttached = true; |
342 | } | 343 | } |
343 | 344 | ||
345 | @action _detachService({ service }) { | ||
346 | service.webview = null; | ||
347 | service.isAttached = false; | ||
348 | } | ||
349 | |||
344 | @action _focusService({ serviceId }) { | 350 | @action _focusService({ serviceId }) { |
345 | const service = this.one(serviceId); | 351 | const service = this.one(serviceId); |
346 | 352 | ||