Skip to content

Commit

Permalink
Fix: Save image not saving the correct page in manga mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Nov 8, 2024
1 parent 62fd2c3 commit b14a26e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/reading.js
Original file line number Diff line number Diff line change
Expand Up @@ -5386,6 +5386,7 @@ module.exports = {
read: read,
images: function(){return images},
imagesNum: imagesNum,
indexNum: function(){return indexNum},
contentNum: function(){return contentNum},
imagesNumLoad: imagesNumLoad,
imagesData: function(){return imagesData},
Expand Down
6 changes: 6 additions & 0 deletions scripts/reading/context-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ function saveAllImages(index = false)
const images = reading.images();
const imagesData = reading.imagesData();

if(index !== false)
{
if(_config.readingManga && !reading.readingViewIs('scroll'))
index = (reading.indexNum() - index) - 1;
}

electronRemote.dialog.showOpenDialog({properties: ['openDirectory', 'createDirectory'], buttonLabel: language.buttons.save}).then(async function(files) {

if(files.filePaths && files.filePaths[0] && fs.statSync(files.filePaths[0]).isDirectory())
Expand Down
2 changes: 1 addition & 1 deletion scripts/title-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function setMenu(_menu)
if(process.platform == 'darwin') // Keep native menu in macOS
_menu = [];

let menu = [];
menu = [];

for(let i = 0, len = _menu.length; i < len; i++)
{
Expand Down

0 comments on commit b14a26e

Please sign in to comment.