mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 10:37:05 +05:30
desktop: integrate UrlLauncher
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
7d103e5efc
commit
c18e2f94f2
1 changed files with 5 additions and 3 deletions
|
@ -12,8 +12,10 @@ import androidx.compose.ui.Modifier
|
|||
import dev.msfjarvis.claw.common.posts.LobstersItem
|
||||
import dev.msfjarvis.claw.common.posts.TEST_POST
|
||||
import dev.msfjarvis.claw.common.theme.LobstersTheme
|
||||
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
|
||||
|
||||
fun main() = Window {
|
||||
val urlLauncher = UrlLauncher()
|
||||
LobstersTheme(darkTheme = false) {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
|
@ -27,9 +29,9 @@ fun main() = Window {
|
|||
LobstersItem(
|
||||
post = TEST_POST,
|
||||
isSaved = false,
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
viewPost = { urlLauncher.launch(TEST_POST.url.ifEmpty { TEST_POST.commentsUrl }) },
|
||||
viewComments = { urlLauncher.launch(TEST_POST.commentsUrl) },
|
||||
toggleSave = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue