Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Use the PublicationRepository to fix the TransactionTooLargeException #303

Merged
merged 3 commits into from
May 7, 2020

Conversation

mickael-menu
Copy link
Member

@mickael-menu mickael-menu commented Apr 17, 2020

Fixes readium/kotlin-toolkit#247

I decided to throw an Exception (and close the Activity in release mode) if an app still uses the old publication intent extra. Since apps can crash when loading a big publication, better make sure they are actually upgrading to this new method as soon as possible.

Usage:

// In the source Activity, do:
intent.putPublication(publication)

// And in the target Activity, in onCreate():
val publication = intent.getPublication(this)

// Don't forget to call this in Activity.onDestroy(), to release the Publication:
intent.destroyPublication()

Pass the Activity to putPublicationFrom, instead of the Intent
@mickael-menu mickael-menu merged commit 7f8b296 into develop May 7, 2020
@mickael-menu mickael-menu deleted the fix/transaction-too-large branch May 7, 2020 14:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publication might be too big to be sent through an Intent to the Navigator
2 participants