Merge pull request #37 from msfjarvis/comments-only

Fallback to comments if post has no URL
This commit is contained in:
Harsh Shandilya 2020-10-06 19:08:52 +05:30 committed by GitHub
commit 7544eb96fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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