mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Add ability to share images from other apps
This commit is contained in:
@@ -82,6 +82,14 @@ class ComposeViewModel(intent: Intent) : QkViewModel<ComposeView, ComposeState>(
|
||||
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<Uri>()
|
||||
intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)?.run { sharedImages += this }
|
||||
intent.getParcelableArrayListExtra<Uri>(Intent.EXTRA_STREAM)?.run { sharedImages += this }
|
||||
attachments.onNext(sharedImages)
|
||||
|
||||
val threadId = intent.extras?.getLong("threadId") ?: 0L
|
||||
var address = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user