Skip to content

Commit 964bb64

Browse files
committed
Fix: Progress was not saved in some cases
1 parent 39f1954 commit 964bb64

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1919
- Master folder support from settings [`9edd70e`](https://github.com/ollm/OpenComic/commit/9edd70ec871855cf2b43fa5cebea4bdf83baae7f)
2020
- Ignore single folders in browsing [`7507563`](https://github.com/ollm/OpenComic/commit/75075631fcad5fb269427c178e9bac86bc352971)
2121
- Search and filter in library/browsing [`8393903`](https://github.com/ollm/OpenComic/commit/8393903117981bea2b8a79e2e50b77d02334aa05)
22-
- Tracking at the end of the chapter/volume setting option
22+
- Tracking at the end of the chapter/volume setting option [`39f1954`](https://github.com/ollm/OpenComic/commit/39f19546b2fd363d321f9c423e706c3dc773aa4f)
2323

2424
##### 🐛 Bug Fixes
2525

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

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

languages/en.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@
175175
"main": "Master folders",
176176
"folder": "Folder",
177177
"noFolders": "No folders"
178-
},
179-
"tracking": {}
178+
}
180179
},
181180
"menu": {
182181
"file": {

scripts/reading.js

+15-6
Original file line numberDiff line numberDiff line change
@@ -1298,9 +1298,9 @@ function showNextComic(mode, animation = true, invert = false)
12981298
}
12991299

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

13051305
currentIndex = indexNum + 1;
13061306
}
@@ -1392,9 +1392,9 @@ function showPreviousComic(mode, animation = true, invert = false)
13921392
}
13931393

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

13991399
currentIndex = 0;
14001400
}
@@ -2476,7 +2476,12 @@ function createAndDeleteBookmark(index = false)
24762476
}
24772477
}
24782478

2479-
var saveReadingProgressA = false;
2479+
var saveReadingProgressA = false, fromSkip = false;
2480+
2481+
function setFromSkip()
2482+
{
2483+
fromSkip = true;
2484+
}
24802485

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

30303035
loadReadingConfig(currentReadingConfigKey);
30313036

3032-
saveReadingProgressA = false;
3037+
if(!fromSkip)
3038+
saveReadingProgressA = false;
3039+
3040+
fromSkip = false;
30333041

30343042
readingCurrentPath = path;
30353043

@@ -3792,6 +3800,7 @@ module.exports = {
37923800
activeOnScroll: function(){return activeOnScroll},
37933801
saveReadingProgress: saveReadingProgress,
37943802
saveReadingProgressA: function(){return saveReadingProgressA},
3803+
setFromSkip: setFromSkip,
37953804
createAndDeleteBookmark: createAndDeleteBookmark,
37963805
currentIndex: function(){return currentIndex},
37973806
currentPageVisibility: function(){return currentPageVisibility},

0 commit comments

Comments
 (0)