Skip to content

Commit

Permalink
Fix: Not reload bookmarks on save images
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm authored Nov 8, 2024
1 parent 7def9ec commit ee40034
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/reading/context-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ function saveAllImages(index = false)
saveImages(toSave, String(highestPage).length);
}

function saveBookmarksImages()
function saveBookmarksImages(loadBookmarks = false)
{
saveAllBookmarksImages(true);
saveAllBookmarksImages(loadBookmarks, true);
}

function saveAllBookmarksImages(onlyCurrent = false)
function saveAllBookmarksImages(loadBookmarks = false, onlyCurrent = false)
{
reading.loadBookmarks();
if(loadBookmarks) reading.loadBookmarks();
const bookmarks = handlebarsContext.bookmarks;

const toSave = [];
Expand Down
4 changes: 2 additions & 2 deletions templates/reading.elements.menus.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@
<span>{{language.global.contextMenu.saveImage}}</span>
</div>

<div class="menu-simple-element menu-simple-element-little reading-context-menu-save-all-images gamepad-item" onclick="reading.contextMenu.saveAllImages();">
<div class="menu-simple-element menu-simple-element-little reading-context-menu-save-all-images gamepad-item" onclick="reading.contextMenu.saveAllImages(true);">
<i class="material-icon menu-simple-icon-first">photo_library</i>
<span>{{language.global.contextMenu.saveAllImages}}</span>
</div>

<div class="menu-simple-separator separator-save-images"></div>

<div class="menu-simple-element menu-simple-element-little reading-context-menu-save-bookmarks-images gamepad-item" onclick="reading.contextMenu.saveBookmarksImages();">
<div class="menu-simple-element menu-simple-element-little reading-context-menu-save-bookmarks-images gamepad-item" onclick="reading.contextMenu.saveBookmarksImages(true);">
<i class="material-icon menu-simple-icon-first">book</i>
<span>{{language.global.contextMenu.saveBookmarksImages}}</span>
</div>
Expand Down

0 comments on commit ee40034

Please sign in to comment.