mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 23:27:04 +05:30
fix(android): prevent comments page from stacking when spammed
This commit is contained in:
parent
02575a917b
commit
7d491de86c
2 changed files with 7 additions and 2 deletions
|
@ -41,9 +41,10 @@ fun rememberPostActions(
|
|||
}
|
||||
|
||||
override fun viewComments(postId: String) {
|
||||
navController.navigate(
|
||||
val currentRoute = navController.currentDestination?.route
|
||||
val newRoute =
|
||||
Destinations.Comments.route.replace(Destinations.Comments.placeholder, postId)
|
||||
)
|
||||
if (currentRoute != Destinations.Comments.route) navController.navigate(newRoute)
|
||||
}
|
||||
|
||||
override fun viewCommentsPage(commentsUrl: String) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue