From 1801f98f8e2ca28619608b29bcf623581fa76747 Mon Sep 17 00:00:00 2001 From: Chandrika Priya Bogadi <46720139+Chandrika-Priya@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:03:36 +0530 Subject: Add feature to display document title along with current title (#2143) Co-authored by: Rachel Cynthia --- src/stores/ServicesStore.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/stores') 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 { // TODO: add checks to not focus service when router path is /settings or /auth const service = this.active; if (service) { + document.title = `Ferdi - ${service.name} ${ + service.dialogTitle ? ` - ${service.dialogTitle}` : '' + } ${service._webview ? `- ${service._webview.getTitle()}` : ''}`; this._focusService({ serviceId: service.id }); if (this.stores.settings.app.splitMode && !focusEvent) { setTimeout(() => { @@ -1082,7 +1085,7 @@ export default class ServicesStore extends Store { this.actions.service.focusService({ serviceId: service.id }); document.title = `Ferdi - ${service.name} ${ service.dialogTitle ? ` - ${service.dialogTitle}` : '' - }`; + } ${service._webview ? `- ${service._webview.getTitle()}` : ''}`; } else { debug('No service is active'); } -- cgit v1.2.3-70-g09d2