www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7c9b1f785c0583f5c883d1db2d4d87c3e8540e6c
parent 01f50b9e4b3ec5344eee0551c5e1a7d17d300b93
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  8 Jun 2006 20:02:26 +0000

Only send itemView 'remove' notifictions for items if they're actually deleted from the DB, not if they're just removed from a collection


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -1279,8 +1279,8 @@ Scholar.Collection.prototype.erase = function(deleteItems){ if (deleteItems){ // Delete items from DB Scholar.Items.get(descendents[i]['id']).erase(); + items.push(descendents[i]['id']); } - items.push(descendents[i]['id']); } } @@ -1298,7 +1298,9 @@ Scholar.Collection.prototype.erase = function(deleteItems){ Scholar.Collections.unload(collections); Scholar.Notifier.trigger('remove', 'collection', collections); - Scholar.Notifier.trigger('remove', 'item', items); + if (items.length){ + Scholar.Notifier.trigger('remove', 'item', items); + } }