mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 18:07:03 +05:30
android: cleanup Destinations class
This commit is contained in:
parent
623e5d0144
commit
bb2213ff86
1 changed files with 9 additions and 9 deletions
|
@ -1,20 +1,20 @@
|
||||||
package dev.msfjarvis.claw.android.ui.navigation
|
package dev.msfjarvis.claw.android.ui.navigation
|
||||||
|
|
||||||
sealed class Destinations(internal val route: String) {
|
sealed class Destinations {
|
||||||
object Hottest : Destinations("hottest") {
|
object Hottest : Destinations() {
|
||||||
fun getRoute() = route
|
fun getRoute() = "hottest"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Newest : Destinations("newest") {
|
object Newest : Destinations() {
|
||||||
fun getRoute() = route
|
fun getRoute() = "newest"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Saved : Destinations("saved") {
|
object Saved : Destinations() {
|
||||||
fun getRoute() = route
|
fun getRoute() = "saved"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Comments : Destinations("comments/%s") {
|
object Comments : Destinations() {
|
||||||
fun getRoute(postId: String) = route.format(postId)
|
fun getRoute(postId: String) = "comments/$postId"
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue