Skip to content

Commit

Permalink
Filter unused keys from annotations to reduce size
Browse files Browse the repository at this point in the history
  • Loading branch information
c6p committed Sep 26, 2021
1 parent 4cd9e1b commit 23f8429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-hypothesis",
"version": "0.1.2",
"version": "0.1.3",
"main": "dist/index.html",
"author": "c6p",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default {
}
// sort by created then save
const annotations = [...annotationMap.values()].sort((a,b) => b.created < a.created ? 1 : -1)
annotations.forEach(a => ['user', 'user_info', 'permissions'].forEach(k => delete a[k]))
await logseq.updateSettings({annotations: null}); // clear settings, BUG? else array size growing
await logseq.updateSettings({annotations}); // clear settings, BUG? else array size growing
this.annotations = annotations;
Expand Down

0 comments on commit 23f8429

Please sign in to comment.