@internetarchive/ia-book-actions 1.4.4-alpha2 → 1.4.4-alpha3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "author": "Internet Archive",
9
9
  "license": "AGPL-3.0-only",
10
- "version": "1.4.4-alpha2",
10
+ "version": "1.4.4-alpha3",
11
11
  "main": "index.js",
12
12
  "module": "index.js",
13
13
  "publishConfig": {
@@ -415,6 +415,16 @@ export default class IABookActions extends LitElement {
415
415
 
416
416
  this.modal?.closeModal();
417
417
 
418
+ // The loan genuinely lapsed while the tab was hidden/backgrounded, so
419
+ // BookReader's page-image access (issued via create_token, not
420
+ // renew_loan) died with it. Resetting this lets the token poller's
421
+ // next successful create_token call re-run lendingBarPostInit() —
422
+ // whatever re-initializes BookReader (e.g. br.init()) — instead of
423
+ // silently skipping it because a token was already issued once this
424
+ // page load. Without this, the loan's countdown resets but BookReader
425
+ // keeps using its now-dead session, so page images break.
426
+ this.postInitComplete = false;
427
+
418
428
  // Optimistically flip browsingExpired back to false so the action bar
419
429
  // stays red (patronIsReadingAction) while the renew_loan request is in
420
430
  // flight, instead of showing the blue "Borrow" state.