From 0f33ca1aa2897549923b130ca831d0d7a341f686 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 19 Oct 2023 23:14:08 -0700 Subject: [PATCH] viewer: fix title changes Signed-off-by: Varun Patil --- src/components/viewer/Viewer.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/viewer/Viewer.vue b/src/components/viewer/Viewer.vue index fb064cc5..392b55c5 100644 --- a/src/components/viewer/Viewer.vue +++ b/src/components/viewer/Viewer.vue @@ -404,11 +404,9 @@ export default defineComponent({ /** Update the document title */ updateTitle(photo: IPhoto | undefined) { - if (!this.originalTitle) { - this.originalTitle = document.title; - } + this.originalTitle ||= document.title; if (photo) { - document.title = `${photo.basename} - ${globalThis.OCA?.Theming?.name}`; + document.title = `${photo.basename} - ${this.originalTitle}`; } else { document.title = this.originalTitle; this.originalTitle = null;