Address some build warnings

This commit is contained in:
arkon
2021-06-05 17:49:20 -04:00
parent 7c23212850
commit 71d225c562
19 changed files with 34 additions and 26 deletions
@@ -4,12 +4,12 @@ import android.content.ClipData
import android.content.Intent
import android.net.Uri
fun Uri.toShareIntent(): Intent {
fun Uri.toShareIntent(type: String = "image/*"): Intent {
val uri = this
return Intent(Intent.ACTION_SEND).apply {
putExtra(Intent.EXTRA_STREAM, uri)
clipData = ClipData.newRawUri(null, uri)
type = "image/*"
setType(type)
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_GRANT_READ_URI_PERMISSION
}
}