diff --git a/qksms/src/main/java/presentation/feature/compose/ComposeViewModel.kt b/qksms/src/main/java/presentation/feature/compose/ComposeViewModel.kt index 7f73eb2e..42999437 100644 --- a/qksms/src/main/java/presentation/feature/compose/ComposeViewModel.kt +++ b/qksms/src/main/java/presentation/feature/compose/ComposeViewModel.kt @@ -82,6 +82,14 @@ class ComposeViewModel(intent: Intent) : QkViewModel( appComponent.inject(this) sharedText = intent.extras?.getString(Intent.EXTRA_TEXT) ?: "" + + // If there are any image attachments, we'll set those as the initial attachments for the + // conversation + val sharedImages = mutableListOf() + intent.getParcelableExtra(Intent.EXTRA_STREAM)?.run { sharedImages += this } + intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM)?.run { sharedImages += this } + attachments.onNext(sharedImages) + val threadId = intent.extras?.getLong("threadId") ?: 0L var address = ""