app: fallback to comments if post has no url

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-10-06 18:53:57 +05:30
parent 78484de959
commit 0da85ba015
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -79,7 +79,7 @@ fun LobstersApp(
} }
LobstersItem( LobstersItem(
item, item,
linkOpenAction = { post -> urlLauncher.launch(post.url) }, linkOpenAction = { post -> urlLauncher.launch(post.url.ifEmpty { post.commentsUrl }) },
commentOpenAction = { post -> urlLauncher.launch(post.commentsUrl) }, commentOpenAction = { post -> urlLauncher.launch(post.commentsUrl) },
) )
} }