From 3aa79f40d7df2ea1fda6531fb62a58130cf81a2a Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 25 Feb 2021 16:41:21 +0200 Subject: [PATCH] Populate PDF reader tab title immediately --- chrome/content/zotero/xpcom/reader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 7bb1801322..9eef9226fa 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -46,9 +46,9 @@ class ReaderInstance { return false; } this._itemID = item.id; + this.updateTitle(); let path = await item.getFilePathAsync(); let buf = await OS.File.read(path, {}); - this.updateTitle(); buf = new Uint8Array(buf).buffer; let annotationItems = item.getAnnotations(); let annotations = (await Promise.all(annotationItems.map(x => this._getAnnotation(x)))).filter(x => x);