Skip to content

Commit

Permalink
Fix: Progress was not saved in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Oct 6, 2023
1 parent 39f1954 commit 964bb64
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Master folder support from settings [`9edd70e`](https://github.com/ollm/OpenComic/commit/9edd70ec871855cf2b43fa5cebea4bdf83baae7f)
- Ignore single folders in browsing [`7507563`](https://github.com/ollm/OpenComic/commit/75075631fcad5fb269427c178e9bac86bc352971)
- Search and filter in library/browsing [`8393903`](https://github.com/ollm/OpenComic/commit/8393903117981bea2b8a79e2e50b77d02334aa05)
- Tracking at the end of the chapter/volume setting option
- Tracking at the end of the chapter/volume setting option [`39f1954`](https://github.com/ollm/OpenComic/commit/39f19546b2fd363d321f9c423e706c3dc773aa4f)

##### 🐛 Bug Fixes

- Gamepad icons not showing in distribution version [`249640d`](https://github.com/ollm/OpenComic/commit/249640d57f3d5768661b63c0ddf8525a02e44d25)
- Go back in gamepad menus [`b2719e5`](https://github.com/ollm/OpenComic/commit/b2719e5e782659f249ce7a6ba6c8b94fe40a3407)
- Wrong detection of folder images in some cases [`425a137`](https://github.com/ollm/OpenComic/commit/425a137333114739cb4f0b1e92e4606f2c9da87c)
- Ignore first gamepad and keyboard event in browsing [`9347fbe`](https://github.com/ollm/OpenComic/commit/9347fbe628143e688f956ed0950510a2265c02e2)
- Blurry image when zooming
- Blurry image when zooming [`0732f3f`](https://github.com/ollm/OpenComic/commit/0732f3f76923f2a50541139e58fb8343e7c20083)
- Progress was not saved in some cases

## [v1.0.0-beta.2](https://github.com/ollm/OpenComic/releases/tag/v1.0.0-beta.2) (03-09-2023)

Expand Down
3 changes: 1 addition & 2 deletions languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@
"main": "Master folders",
"folder": "Folder",
"noFolders": "No folders"
},
"tracking": {}
}
},
"menu": {
"file": {
Expand Down
21 changes: 15 additions & 6 deletions scripts/reading.js
Original file line number Diff line number Diff line change
Expand Up @@ -1298,9 +1298,9 @@ function showNextComic(mode, animation = true, invert = false)
}

if(invert)
showComicSkip = setTimeout('dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.previousComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", true, false, true);', _config.readingDelayComicSkip * 1000);
showComicSkip = setTimeout('reading.setFromSkip(); dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.previousComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", true, false, true);', _config.readingDelayComicSkip * 1000);
else
showComicSkip = setTimeout('dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.nextComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", false, false, true);', _config.readingDelayComicSkip * 1000);
showComicSkip = setTimeout('reading.setFromSkip(); dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.nextComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", false, false, true);', _config.readingDelayComicSkip * 1000);

currentIndex = indexNum + 1;
}
Expand Down Expand Up @@ -1392,9 +1392,9 @@ function showPreviousComic(mode, animation = true, invert = false)
}

if(invert)
showComicSkip = setTimeout('dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.nextComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", false, false, true);', _config.readingDelayComicSkip * 1000);
showComicSkip = setTimeout('reading.setFromSkip(); dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.nextComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", false, false, true);', _config.readingDelayComicSkip * 1000);
else
showComicSkip = setTimeout('dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.previousComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", true, false, true);', _config.readingDelayComicSkip * 1000);
showComicSkip = setTimeout('reading.setFromSkip(); dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.previousComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.indexMainPathA()), 'doubles')+'", true, false, true);', _config.readingDelayComicSkip * 1000);

currentIndex = 0;
}
Expand Down Expand Up @@ -2476,7 +2476,12 @@ function createAndDeleteBookmark(index = false)
}
}

var saveReadingProgressA = false;
var saveReadingProgressA = false, fromSkip = false;

function setFromSkip()
{
fromSkip = true;
}

//Save current reading progress
function saveReadingProgress(path = false)
Expand Down Expand Up @@ -3029,7 +3034,10 @@ async function read(path, index = 1, end = false, isCanvas = false)

loadReadingConfig(currentReadingConfigKey);

saveReadingProgressA = false;
if(!fromSkip)
saveReadingProgressA = false;

fromSkip = false;

readingCurrentPath = path;

Expand Down Expand Up @@ -3792,6 +3800,7 @@ module.exports = {
activeOnScroll: function(){return activeOnScroll},
saveReadingProgress: saveReadingProgress,
saveReadingProgressA: function(){return saveReadingProgressA},
setFromSkip: setFromSkip,
createAndDeleteBookmark: createAndDeleteBookmark,
currentIndex: function(){return currentIndex},
currentPageVisibility: function(){return currentPageVisibility},
Expand Down

0 comments on commit 964bb64

Please sign in to comment.