From 0b270ee87ac0b8ce23cf6049484e46c9d88c791a Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 24 Mar 2023 09:17:17 +0100 Subject: [PATCH] remove "hide included images" feature since with attachments it's no longer necessary --- ..._remove_hideIncludedImages_main_option.sql | 2 ++ src/public/app/entities/fnote.js | 7 ------- src/public/app/widgets/note_tree.js | 20 ------------------- src/routes/api/options.js | 3 +-- src/services/app_info.js | 2 +- src/services/options_init.js | 1 - 6 files changed, 4 insertions(+), 31 deletions(-) create mode 100644 db/migrations/0219__remove_hideIncludedImages_main_option.sql diff --git a/db/migrations/0219__remove_hideIncludedImages_main_option.sql b/db/migrations/0219__remove_hideIncludedImages_main_option.sql new file mode 100644 index 000000000..5e4ec083b --- /dev/null +++ b/db/migrations/0219__remove_hideIncludedImages_main_option.sql @@ -0,0 +1,2 @@ +DELETE FROM options WHERE name = 'hideIncludedImages_main'; +DELETE FROM entity_changes WHERE entityName = 'options' AND entityId = 'hideIncludedImages_main'; \ No newline at end of file diff --git a/src/public/app/entities/fnote.js b/src/public/app/entities/fnote.js index 1f44a97bf..6cf6d1b58 100644 --- a/src/public/app/entities/fnote.js +++ b/src/public/app/entities/fnote.js @@ -490,13 +490,6 @@ class FNote { return; } - if (options.is("hideIncludedImages_main")) { - const imageLinks = this.getRelations('imageLink'); - - // image is already visible in the parent note so no need to display it separately in the book - childBranches = childBranches.filter(branch => !imageLinks.find(rel => rel.value === branch.noteId)); - } - // we're not checking hideArchivedNotes since that would mean we need to lazy load the child notes // which would seriously slow down everything. // we check this flag only once user chooses to expand the parent. This has the negative consequence that diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 43d2ee8f8..ed6c03bfe 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -119,15 +119,6 @@ const TPL = ` Hide archived notes -
- -