mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 11:47:04 +05:30
common: change UrlLauncher to be backed by UriHandler
This commit is contained in:
parent
d285afed0b
commit
67893552e7
5 changed files with 13 additions and 16 deletions
|
@ -37,15 +37,15 @@ fun main() = application {
|
|||
val postActions = remember {
|
||||
object : PostActions {
|
||||
override fun viewPost(postUrl: String, commentsUrl: String) {
|
||||
urlLauncher.launch(postUrl.ifEmpty { commentsUrl })
|
||||
urlLauncher.openUri(postUrl.ifEmpty { commentsUrl })
|
||||
}
|
||||
|
||||
override fun viewComments(postId: String) {
|
||||
urlLauncher.launch("${LobstersApi.BASE_URL}/s/${postId}")
|
||||
urlLauncher.openUri("${LobstersApi.BASE_URL}/s/${postId}")
|
||||
}
|
||||
|
||||
override fun viewCommentsPage(commentsUrl: String) {
|
||||
urlLauncher.launch(commentsUrl)
|
||||
urlLauncher.openUri(commentsUrl)
|
||||
}
|
||||
|
||||
override fun toggleSave(post: SavedPost) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue