mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 13:27:03 +05:30
android: add navigation destinations for user profile
This commit is contained in:
parent
f30113b483
commit
c046036fdc
2 changed files with 15 additions and 0 deletions
|
@ -134,6 +134,17 @@
|
||||||
android:pathPattern="/s/....../...*"
|
android:pathPattern="/s/....../...*"
|
||||||
android:scheme="https" />
|
android:scheme="https" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
|
<data
|
||||||
|
android:host="lobste.rs"
|
||||||
|
android:pathPattern="/u/......*"
|
||||||
|
android:scheme="https" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.startup.InitializationProvider"
|
android:name="androidx.startup.InitializationProvider"
|
||||||
|
|
|
@ -17,6 +17,10 @@ sealed class Destinations {
|
||||||
fun getRoute(postId: String) = "comments/$postId"
|
fun getRoute(postId: String) = "comments/$postId"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object User : Destinations() {
|
||||||
|
fun getRoute(username: String) = "user/$username"
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val startDestination
|
val startDestination
|
||||||
get() = Hottest
|
get() = Hottest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue