mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #3892 from jivesh/main
Android QoL: use Android sharesheet when sharing article links
This commit is contained in:
commit
cb2206fbb3
1 changed files with 6 additions and 5 deletions
|
|
@ -157,12 +157,13 @@ class WebReaderViewModel @Inject constructor(
|
|||
|
||||
fun showShareLinkSheet(context: Context) {
|
||||
webReaderParamsLiveData.value?.let {
|
||||
val browserIntent = Intent(Intent.ACTION_SEND)
|
||||
val sendIntent = Intent(Intent.ACTION_SEND)
|
||||
|
||||
browserIntent.setType("text/plain")
|
||||
browserIntent.putExtra(Intent.EXTRA_TEXT, it.item.pageURLString)
|
||||
browserIntent.putExtra(Intent.EXTRA_SUBJECT, it.item.title)
|
||||
context.startActivity(browserIntent)
|
||||
sendIntent.setType("text/plain")
|
||||
sendIntent.putExtra(Intent.EXTRA_TEXT, it.item.pageURLString)
|
||||
sendIntent.putExtra(Intent.EXTRA_SUBJECT, it.item.title)
|
||||
val shareIntent = Intent.createChooser(sendIntent, null)
|
||||
context.startActivity(shareIntent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue