zotero/chrome
abaevbog 2d3375e9f6
Revised logic of trashed collections in item cache (#4358)
- revert change from 2401a34031
that only loads un-trashed collections in _loadCollections.
If an item only belongs to deleted collections, item._loaded.collections = true
from _loadCollections will never run, so an exception
will be thrown in item.toJSON() when syncing happens.
Instead, to address the problem of item.getCollections()
having stale data #4307, add 'includeTrashed' parameter to
item.getCollections() based on which item._collections
will be filtered. Fixes: #4346
- revert earlier, no more necessary, changes from a532cfb475
to not alter item._collections cache when collections are being trashed or restored.
Collection is removed from item._collections only when it is permanently
erased.
- removed unnecessary test checking for consistent item._collections
value before and after reload, since item._collections is no longer
modified
- fix encountered bug where a trashed child collection is not
unloaded if a parent collection is erased without being trashed first.
- tweaked Zotero.Search sql construction to count items
that only belong to trashed collections into 'unfiled'. Fixes: #4347

---------

Co-authored-by: Dan Stillman
2024-07-09 03:34:12 -04:00
..
content Revised logic of trashed collections in item cache (#4358) 2024-07-09 03:34:12 -04:00
locale Update locales from Transifex and merge new English strings 2024-07-08 00:26:50 -04:00
skin/default/zotero Redesign Document Preferences and Create Bibliography dialogs (#4265) 2024-07-01 00:24:35 -04:00