compose: downloads: Initial migration

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-09-15 19:30:52 +05:30
parent 54b7bf502e
commit e1b3f5be73
34 changed files with 636 additions and 774 deletions

View File

@@ -72,12 +72,12 @@ fun Context.appInfo(packageName: String) {
}
}
fun Context.share(app: App) {
fun Context.share(displayName: String, packageName: String) {
try {
val sendIntent = Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_SUBJECT, app.displayName)
putExtra(Intent.EXTRA_TEXT, "${Constants.SHARE_URL}${app.packageName}")
putExtra(Intent.EXTRA_SUBJECT, displayName)
putExtra(Intent.EXTRA_TEXT, "${Constants.SHARE_URL}${packageName}")
type = "text/plain"
}
startActivity(Intent.createChooser(sendIntent, getString(R.string.action_share)))