@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 +1 -1
- package/src/ia-book-actions.js +10 -0
package/package.json
CHANGED
package/src/ia-book-actions.js
CHANGED
|
@@ -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.
|