viewer: fix title changes

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/888/head
Varun Patil 2023-10-19 23:14:08 -07:00
parent d048b7b3bf
commit 0f33ca1aa2
1 changed files with 2 additions and 4 deletions

View File

@ -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;