Skip to content

Commit

Permalink
cr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Nov 21, 2023
1 parent c2d4162 commit ab28a86
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,16 @@ fun AppCompatActivity.sendFile(file: File?) {
if (file != null) {
val sendIntent: Intent = makeIntent(file, this)

val packagesToExclude = arrayOf<String>()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val shareSheetIntent = ShareSheetHelper().getShareSheetIntent(
sendIntent,
this,
R.string.activity_chooser_send_file_title,
packagesToExclude
intent = sendIntent,
context = this,
title = R.string.activity_chooser_send_file_title,
packagesToExclude = arrayOf()
)
this.startActivity(shareSheetIntent)
} else {
val chooserDialog: DialogFragment = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude)
val chooserDialog: DialogFragment = ShareLinkToDialog.newInstance(sendIntent, arrayOf())
chooserDialog.show(this.supportFragmentManager, "CHOOSER_DIALOG")
}
} else {
Expand Down

0 comments on commit ab28a86

Please sign in to comment.