Fix multiple share intent issue
This commit is contained in:
parent
51bbee297c
commit
002e881704
|
@ -76,17 +76,19 @@ class IncomingShareFragment @Inject constructor(
|
||||||
attachmentsHelper = AttachmentsHelper.create(this, this).register()
|
attachmentsHelper = AttachmentsHelper.create(this, this).register()
|
||||||
|
|
||||||
val intent = vectorBaseActivity.intent
|
val intent = vectorBaseActivity.intent
|
||||||
if (intent?.action == Intent.ACTION_SEND || intent?.action == Intent.ACTION_SEND_MULTIPLE) {
|
val isShareManaged = when (intent?.action) {
|
||||||
var isShareManaged = attachmentsHelper.handleShareIntent(
|
Intent.ACTION_SEND -> {
|
||||||
IntentUtils.getPickerIntentForSharing(intent)
|
var isShareManaged = attachmentsHelper.handleShareIntent(IntentUtils.getPickerIntentForSharing(intent))
|
||||||
)
|
if (!isShareManaged) {
|
||||||
if (!isShareManaged) {
|
isShareManaged = handleTextShare(intent)
|
||||||
isShareManaged = handleTextShare(intent)
|
}
|
||||||
|
isShareManaged
|
||||||
}
|
}
|
||||||
if (!isShareManaged) {
|
Intent.ACTION_SEND_MULTIPLE -> attachmentsHelper.handleShareIntent(intent)
|
||||||
cannotManageShare(R.string.error_handling_incoming_share)
|
else -> false
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
if (!isShareManaged) {
|
||||||
cannotManageShare(R.string.error_handling_incoming_share)
|
cannotManageShare(R.string.error_handling_incoming_share)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue