mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +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
|
||||
|
||||
sealed class Destinations(internal val route: String) {
|
||||
object Hottest : Destinations("hottest") {
|
||||
fun getRoute() = route
|
||||
sealed class Destinations {
|
||||
object Hottest : Destinations() {
|
||||
fun getRoute() = "hottest"
|
||||
}
|
||||
|
||||
object Newest : Destinations("newest") {
|
||||
fun getRoute() = route
|
||||
object Newest : Destinations() {
|
||||
fun getRoute() = "newest"
|
||||
}
|
||||
|
||||
object Saved : Destinations("saved") {
|
||||
fun getRoute() = route
|
||||
object Saved : Destinations() {
|
||||
fun getRoute() = "saved"
|
||||
}
|
||||
|
||||
object Comments : Destinations("comments/%s") {
|
||||
fun getRoute(postId: String) = route.format(postId)
|
||||
object Comments : Destinations() {
|
||||
fun getRoute(postId: String) = "comments/$postId"
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue