Reuse search result item viewmodels

This commit is contained in:
MM20
2023-04-21 13:37:00 +02:00
parent d1482ad112
commit df1aa8c119
29 changed files with 658 additions and 481 deletions
@@ -90,6 +90,16 @@ data class Website(
return context.tryStartActivity(getLaunchIntent(), options)
}
fun share(context: Context) {
val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.putExtra(
Intent.EXTRA_TEXT,
"${label}\n\n${description}\n\n${url}"
)
shareIntent.type = "text/plain"
context.startActivity(Intent.createChooser(shareIntent, null))
}
companion object {
const val Domain = "web"
}