ReadingListHost

interface ReadingListHost

Reading list interface for the host app to implement.

Types

Link copied to clipboard
data class EmptyListPlaceholderStrings(val description: String, val buttonTitle: String?)

Strings to be displayed in an empty reading list view.

Functions

Link copied to clipboard

Return the placeholder which the SDK should display in an empty reading list view. Should return null if no placeholder functionality is needed.

Link copied to clipboard
abstract fun onDidUpdateReadingList(list: ReadingList, previousList: ReadingList?)

Called when the user's reading list has changed, either by adding or deleting a book. After this, the list returned by readingList should in the optimal case be the same list.

Link copied to clipboard

Called by the SDK when user taps on the button in empty reading list view. The button's title is set by the emptyListPlaceholder function.

Link copied to clipboard
abstract fun readingList(): ReadingList?

Return the current state of the user's reading list.