ReadingListHost
public protocol ReadingListHost
A protocol to be implemented by the host application for communicating reading list information with the SDK.
See also
ReadingList
-
Return the current reading list to the SDK.
If the state of the list is unknown - for networking reasons, etc - the implementation should return
nil
.Declaration
Swift
@MainActor func readingList() -> ReadingList?
-
Accept an updated reading list from the SDK.
Declaration
Swift
@MainActor func didUpdateReadingList(list: ReadingList, previousList: ReadingList?)
Parameters
list
The new reading list
previousList
The previous reading list (if one was available).
-
Return the placeholder which SDK should display in an empty Reading List view. Should return
nil
if no placeholder functionality is needed.Declaration
Swift
@MainActor func emptyListPlaceholder() -> (description: String, buttonTitle: String?)?
Return Value
- description: The description text
- buttonTitle: If button title is provided, a button will be rendered with this title
-
Called by the SDK when user taps on the button in empty reading list view. Button’s title is set by the
emptyListPlaceholder
function.Declaration
Swift
@MainActor func emptyListPlaceholderButtonTapped()