mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
allow sharing multiple handpicked contacts at once
This commit is contained in:
@ -68,14 +68,14 @@ fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (new
|
||||
}
|
||||
}
|
||||
|
||||
fun BaseSimpleActivity.shareContact(contact: Contact) {
|
||||
fun BaseSimpleActivity.shareContacts(contacts: ArrayList<Contact>) {
|
||||
val file = getTempFile()
|
||||
if (file == null) {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
return
|
||||
}
|
||||
|
||||
VcfExporter().exportContacts(this, file, arrayListOf(contact)) {
|
||||
VcfExporter().exportContacts(this, file, contacts) {
|
||||
if (it == VcfExporter.ExportResult.EXPORT_OK) {
|
||||
val uri = getFilePublicUri(file, BuildConfig.APPLICATION_ID)
|
||||
shareUri(uri, BuildConfig.APPLICATION_ID)
|
||||
|
Reference in New Issue
Block a user