diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 46f85eb28..f3a392eb0 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2081,6 +2081,7 @@ Zotero.Item.prototype.getFilePathAsync = Zotero.Promise.coroutine(function* () { // Ignore .zotero* files that were relinked before we started blocking them if (path.startsWith(".zotero")) { Zotero.debug("Ignoring attachment file " + path, 2); + this._updateAttachmentStates(false); return false; } @@ -2111,6 +2112,8 @@ Zotero.Item.prototype.getFilePathAsync = Zotero.Promise.coroutine(function* () { this._updateAttachmentStates(false); return false; } + + this._updateAttachmentStates(true); return path; } diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js index ad39c9827..3d182f809 100644 --- a/chrome/content/zotero/xpcom/itemTreeView.js +++ b/chrome/content/zotero/xpcom/itemTreeView.js @@ -1037,8 +1037,6 @@ Zotero.ItemTreeView.prototype.getCellText = function (row, column) Zotero.ItemTreeView.prototype.getImageSrc = function(row, col) { - var self = this; - if(col.id == 'zotero-items-column-title') { // Get item type icon and tag swatches @@ -1086,8 +1084,8 @@ Zotero.ItemTreeView.prototype.getImageSrc = function(row, col) item.getBestAttachmentState() // Refresh cell when promise is fulfilled .then(function (state) { - self._treebox.invalidateCell(row, col); - }) + this._treebox.invalidateCell(row, col); + }.bind(this)) .done(); } } @@ -1103,10 +1101,12 @@ Zotero.ItemTreeView.prototype.getImageSrc = function(row, col) item.fileExists() // Refresh cell when promise is fulfilled .then(function (exists) { - self._treebox.invalidateCell(row, col); - }); + this._treebox.invalidateCell(row, col); + }.bind(this)); } } + + return ""; } Zotero.ItemTreeView.prototype.isContainer = function(row)