zotero/test
Dan Stillman 6942506eba Rework object type checking in items list
a532cfb475 added `isCollection()`, `isSearch()`, and `isItem()` methods
to data objects to handle collections and searches in the trash, with
`isItem()` checking whether `._ObjectType` was `Item`. That left out
feed items (`._ObjectType` == `FeedItem`), and when c384fef867 made
`getSelectedItems()` return only items, it used `isItem()`, so feed
items were excluded, which broke feed-item toggling between read and
unread [1] and possibly some other things.

The simple fix would be to make `isItem` match feed items as well (which
could potentially fix other bugs related to feed items), but there was
actually no need to add new methods (which can get confused with
`CollectionTreeRow` methods) when we can just check the object type with
`obj instanceof Zotero.Item`, which gets the benefit of inheritance and
matches `Zotero.FeedItem` instances as well.

[1] https://forums.zotero.org/discussion/115571/cannot-change-the-status-of-title-in-subscribtion
2024-06-28 02:09:49 -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 Rework object type checking in items list 2024-06-28 02:09:49 -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