diff options
author | Chandrika Priya Bogadi <46720139+Chandrika-Priya@users.noreply.github.com> | 2021-10-26 23:03:36 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 23:03:36 +0530 |
commit | 1801f98f8e2ca28619608b29bcf623581fa76747 (patch) | |
tree | d2653b410c07e3e5cac5e4bc2465d892e2a8fa9d /src/stores | |
parent | docs: add Chandrika-Priya as a contributor for code (#2145) [skip ci] (diff) | |
download | ferdium-app-1801f98f8e2ca28619608b29bcf623581fa76747.tar.gz ferdium-app-1801f98f8e2ca28619608b29bcf623581fa76747.tar.zst ferdium-app-1801f98f8e2ca28619608b29bcf623581fa76747.zip |
Add feature to display document title along with current title (#2143)
Co-authored by: Rachel Cynthia <rachel883omega@gmail.com>
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index e52d661f3..926ee36f0 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -690,6 +690,9 @@ export default class ServicesStore extends Store { | |||
690 | // TODO: add checks to not focus service when router path is /settings or /auth | 690 | // TODO: add checks to not focus service when router path is /settings or /auth |
691 | const service = this.active; | 691 | const service = this.active; |
692 | if (service) { | 692 | if (service) { |
693 | document.title = `Ferdi - ${service.name} ${ | ||
694 | service.dialogTitle ? ` - ${service.dialogTitle}` : '' | ||
695 | } ${service._webview ? `- ${service._webview.getTitle()}` : ''}`; | ||
693 | this._focusService({ serviceId: service.id }); | 696 | this._focusService({ serviceId: service.id }); |
694 | if (this.stores.settings.app.splitMode && !focusEvent) { | 697 | if (this.stores.settings.app.splitMode && !focusEvent) { |
695 | setTimeout(() => { | 698 | setTimeout(() => { |
@@ -1082,7 +1085,7 @@ export default class ServicesStore extends Store { | |||
1082 | this.actions.service.focusService({ serviceId: service.id }); | 1085 | this.actions.service.focusService({ serviceId: service.id }); |
1083 | document.title = `Ferdi - ${service.name} ${ | 1086 | document.title = `Ferdi - ${service.name} ${ |
1084 | service.dialogTitle ? ` - ${service.dialogTitle}` : '' | 1087 | service.dialogTitle ? ` - ${service.dialogTitle}` : '' |
1085 | }`; | 1088 | } ${service._webview ? `- ${service._webview.getTitle()}` : ''}`; |
1086 | } else { | 1089 | } else { |
1087 | debug('No service is active'); | 1090 | debug('No service is active'); |
1088 | } | 1091 | } |