mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 02:57: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
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
* Backup and restore options for saved posts
|
* Backup and restore options for saved posts
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Spamming the comments button no longer causes it to be opened multiple times
|
||||||
|
|
||||||
## [1.28.0] - 2023-06-03
|
## [1.28.0] - 2023-06-03
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -41,9 +41,10 @@ fun rememberPostActions(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun viewComments(postId: String) {
|
override fun viewComments(postId: String) {
|
||||||
navController.navigate(
|
val currentRoute = navController.currentDestination?.route
|
||||||
|
val newRoute =
|
||||||
Destinations.Comments.route.replace(Destinations.Comments.placeholder, postId)
|
Destinations.Comments.route.replace(Destinations.Comments.placeholder, postId)
|
||||||
)
|
if (currentRoute != Destinations.Comments.route) navController.navigate(newRoute)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun viewCommentsPage(commentsUrl: String) {
|
override fun viewCommentsPage(commentsUrl: String) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue