Skip to content

Commit

Permalink
Fixed reading not being resumed from last position
Browse files Browse the repository at this point in the history
  • Loading branch information
svera authored Jan 16, 2025
1 parent a568c4e commit fb66553
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/webserver/embedded/js/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ class Reader {
}
async open(file) {
this.view = document.createElement('foliate-view')
const storage = window.localStorage
const slug = document.getElementById('slug').value
document.body.append(this.view)
await this.view.open(file)
await this.view.init({lastLocation: storage.getItem(slug)})
this.view.addEventListener('load', this.#onLoad.bind(this))
this.view.addEventListener('relocate', this.#onRelocate.bind(this))

Expand Down

0 comments on commit fb66553

Please sign in to comment.