zotero/test
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
..
components Switch back to @mozilla.org/browser/clh;1 and fix tests 2023-05-24 08:21:16 -04:00
content Fix build failure from 42d4064bac 2024-06-24 02:53:48 -04:00
resource fx-compat: Update httpd.js from mozilla-central 1739f130 2022-06-17 20:24:43 -04:00
tests Revised logic of trashed collections in item cache (#4358) 2024-07-09 03:34:12 -04:00
chrome.manifest fx115: Restore test runner 2024-03-30 00:58:53 -04:00
runtests.sh Add pref to enable local API (#4236) 2024-06-14 06:25:39 -04:00