mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 10:37:05 +05:30
common: add PostActions#viewCommentsPage
This commit is contained in:
parent
53905c80de
commit
4573f82f50
3 changed files with 9 additions and 0 deletions
|
@ -78,6 +78,10 @@ fun LobstersApp(
|
|||
navController.navigate(Destinations.Comments.format(postId))
|
||||
}
|
||||
|
||||
override fun viewCommentsPage(commentsUrl: String) {
|
||||
urlLauncher.launch(commentsUrl)
|
||||
}
|
||||
|
||||
override fun toggleSave(post: SavedPost) {
|
||||
viewModel.toggleSave(post)
|
||||
}
|
||||
|
|
|
@ -5,5 +5,6 @@ import dev.msfjarvis.claw.database.local.SavedPost
|
|||
interface PostActions {
|
||||
fun viewPost(postUrl: String, commentsUrl: String)
|
||||
fun viewComments(postId: String)
|
||||
fun viewCommentsPage(commentsUrl: String)
|
||||
fun toggleSave(post: SavedPost)
|
||||
}
|
||||
|
|
|
@ -44,6 +44,10 @@ fun main() = application {
|
|||
urlLauncher.launch("${LobstersApi.BASE_URL}/s/${postId}")
|
||||
}
|
||||
|
||||
override fun viewCommentsPage(commentsUrl: String) {
|
||||
urlLauncher.launch(commentsUrl)
|
||||
}
|
||||
|
||||
override fun toggleSave(post: SavedPost) {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue