diff options
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 67fd4103f..16defb327 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -163,6 +163,13 @@ export default class ServicesStore extends Store { | |||
163 | ); | 163 | ); |
164 | 164 | ||
165 | reaction( | 165 | reaction( |
166 | () => this.stores.settings.app.splitMode, | ||
167 | () => { | ||
168 | this._shareSettingsWithServiceProcess(); | ||
169 | }, | ||
170 | ); | ||
171 | |||
172 | reaction( | ||
166 | () => this.stores.settings.app.searchEngine, | 173 | () => this.stores.settings.app.searchEngine, |
167 | () => { | 174 | () => { |
168 | this._shareSettingsWithServiceProcess(); | 175 | this._shareSettingsWithServiceProcess(); |
@@ -667,12 +674,21 @@ export default class ServicesStore extends Store { | |||
667 | } | 674 | } |
668 | } | 675 | } |
669 | 676 | ||
670 | @action _focusActiveService() { | 677 | @action _focusActiveService(focusEvent = null) { |
671 | if (this.stores.user.isLoggedIn) { | 678 | if (this.stores.user.isLoggedIn) { |
672 | // TODO: add checks to not focus service when router path is /settings or /auth | 679 | // TODO: add checks to not focus service when router path is /settings or /auth |
673 | const service = this.active; | 680 | const service = this.active; |
674 | if (service) { | 681 | if (service) { |
675 | this._focusService({ serviceId: service.id }); | 682 | this._focusService({ serviceId: service.id }); |
683 | if (this.stores.settings.app.splitMode && !focusEvent) { | ||
684 | setTimeout(() => { | ||
685 | document.querySelector('.services__webview-wrapper.is-active').scrollIntoView({ | ||
686 | behavior: 'smooth', | ||
687 | block: 'end', | ||
688 | inline: 'nearest', | ||
689 | }); | ||
690 | }, 10); | ||
691 | } | ||
676 | } else { | 692 | } else { |
677 | debug('No service is active'); | 693 | debug('No service is active'); |
678 | } | 694 | } |