Skip to content

Commit

Permalink
Using itemType for selecting tags, instead of itemTypeID
Browse files Browse the repository at this point in the history
  • Loading branch information
frianasoa committed Dec 7, 2023
1 parent 05ba9ab commit 18dba24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ var Ai;
var CryptoJS;

const ANNOTATION = 1;
const ANNOTATION_LABEL = "annotation";
const ATTACHMENT = 3;
const ATTACHMENT_LABEL = "attachment";
const NOTE = 28;
const NOTE_LABEL = "note";

let mainWindowListener;

Expand Down
4 changes: 2 additions & 2 deletions core/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Data = {
var collections = collection.getChildCollections();

items.forEach(item=>{
if(![ANNOTATION, ATTACHMENT, NOTE].includes(item.itemTypeID))
if(![ANNOTATION_LABEL, ATTACHMENT_LABEL, NOTE_LABEL].includes(item.itemType))
{
ids.push(item.id);
}
Expand Down Expand Up @@ -90,7 +90,7 @@ Data = {
var item = Zotero.Items.get(id);
if(item!==false)
{
if(![ANNOTATION, ATTACHMENT, NOTE].includes(item.itemTypeID))
if(![ANNOTATION_LABEL, ATTACHMENT_LABEL, NOTE_LABEL].includes(item.itemType))
{
taglist = taglist.concat(Data.notetags(item));
taglist = taglist.concat(Data.attachmenttags(item));
Expand Down
2 changes: 1 addition & 1 deletion zenote-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"version": "0.4.9",
"update_link": "https://github.com/frianasoa/Ze-Notes/releases/download/v0.4.9/zenotes-v0.4.9.xpi",
"update_hash": "sha256:117690ec9851fc41e1fe96430bfaf661d0b8719918cbde92258501ee69f1f6bd",
"update_hash": "sha256:2c86dc390f655ea84ea880a3af8064a4f493b2710fec45eba5c76d98d7b5653e",
"applications": {
"gecko": {
"strict_min_version": "60.0"
Expand Down

0 comments on commit 18dba24

Please sign in to comment.