Skip to content

Commit

Permalink
fix(share_plus): Ensure subject is not null before calling putExtra(I…
Browse files Browse the repository at this point in the history
…ntent.EXTRA_SUBJECT, subject) (#2518)
  • Loading branch information
jmsheff committed Jan 20, 2024
1 parent 05ad6c7 commit f0bbbef
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ internal class Share(
action = Intent.ACTION_SEND
type = "text/plain"
putExtra(Intent.EXTRA_TEXT, text)
putExtra(Intent.EXTRA_SUBJECT, subject)
if (subject != null) {
putExtra(Intent.EXTRA_SUBJECT, subject)
}
}
// If we dont want the result we use the old 'createChooser'
val chooserIntent = if (withResult) {
Expand Down

0 comments on commit f0bbbef

Please sign in to comment.