Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / news / src / main / java / com / vayunmathur / news / Route.kt
Route.kt32 lines · 969 BRaw
| 1 | package com.vayunmathur.news |
| 2 | |
| 3 | import com.vayunmathur.library.util.NavKey |
| 4 | import kotlinx.serialization.Serializable |
| 5 | |
| 6 | @Serializable |
| 7 | /** Navigation destinations for the news app. */ |
| 8 | sealed interface Route : NavKey { |
| 9 | @Serializable |
| 10 | /** Merged story feed across all sources, ordered by source count. */ |
| 11 | data object Feed : Route |
| 12 | |
| 13 | @Serializable |
| 14 | /** Story page for the story with [storyId] (see domain Story.id). */ |
| 15 | data class Story(val storyId: String) : Route |
| 16 | |
| 17 | @Serializable |
| 18 | /** Clean reader (or original web view) for the article at [url]. */ |
| 19 | data class Reader(val url: String) : Route |
| 20 | |
| 21 | @Serializable |
| 22 | /** Bookmarked articles, readable offline. */ |
| 23 | data object Saved : Route |
| 24 | |
| 25 | @Serializable |
| 26 | /** Picker for the manually chosen Local news location preference. */ |
| 27 | data object LocalLocation : Route |
| 28 | |
| 29 | @Serializable |
| 30 | /** News settings (holds the Local news location preference). */ |
| 31 | data object Settings : Route |
| 32 | } |