PublicationEvent

sealed interface PublicationEvent

What the user did on co.cafeyn.cgs.api.features.publication.PublicationScreen. The screen never navigates on its own — handle these to decide where each interaction leads.

The "see all" events carry the publication shown: after an edition switch, the edition the user picked rather than the one you passed.

Inheritors

Types

Link copied to clipboard
data class ClickOnArticle(val article: ArticleShort, val articles: List<ArticleShort>, val index: Int, val context: Map<String, Any> = emptyMap()) : PublicationEvent

An article was tapped. Open it in the reader.

Link copied to clipboard
data class ClickOnIssue(val issue: IssueShort, val page: Int = 1, val context: Map<String, Any> = emptyMap()) : PublicationEvent

An issue was tapped. Open it with Reader.open, which downloads it first if it is not on the device.

Link copied to clipboard
data class ClickOnSeeAllArchives(val publication: Publication, val context: Map<String, Any> = emptyMap()) : PublicationEvent

The archives section's "see all" was tapped. Navigate to co.cafeyn.cgs.api.features.publication.ArchivesScreen with publication.id to list every archived issue year by year.

Link copied to clipboard
data class ClickOnSeeAllArticles(val publication: Publication, val context: Map<String, Any> = emptyMap()) : PublicationEvent

The articles section's "see all" was tapped. Navigate to co.cafeyn.cgs.api.features.publication.ArticleListScreen with publication.id to list every article of its latest issue.