You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnutils.isStringNote(this.type,this.mime);// here was !== undefined && utils.isStringNote(this.type, this.mime); I dont know why we need !=undefined. But it filters out canvas libary items
// these 2 variables are needed to compare the library state (all library items) after loading to the state when the library changed. So we can find attachments to be deleted.
120
+
//every libraryitem is saved on its own json file in the attachments of the note.
metadata: {// metadata to use in the cache variables for comparing old library state and new one. We delete unnecessary items later, calling the server directly
251
+
attachmentId: attachment.attachmentId,
252
+
title: attachment.title,
253
+
},
254
+
};
255
+
})
256
+
).then(results=>{
257
+
if(note.noteId!==this.currentNoteId){
258
+
// current note changed in the course of the async operation
// excalidraw saves the library as a own state. the items are saved to libraryItems. then we compare the library right now with a libraryitemcache. The cache is filled when we first load the Library into the note.
346
+
//We need the cache to delete old attachments later in the server.
// before we saved the metadata of the attachments in a cache. the title of the attachment is a combination of libraryitem ´s ID und it´s name.
352
+
// we compare the library items in the libraryitemmissmatch variable (this one saves all libraryitems that are different to the state right now. E.g. you delete 1 item, this item is saved as mismatch)
353
+
// then we combine its id and title and search the according attachmentID.
0 commit comments