mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Handle no uri to share case.
This commit is contained in:
+19
-15
@@ -75,21 +75,25 @@ class SharePresenter @AssistedInject constructor(
|
|||||||
val result = shareIntentHandler.handleIncomingShareIntent(
|
val result = shareIntentHandler.handleIncomingShareIntent(
|
||||||
intent,
|
intent,
|
||||||
onUris = { filesToShare ->
|
onUris = { filesToShare ->
|
||||||
roomIds
|
if (filesToShare.isEmpty()) {
|
||||||
.map { roomId ->
|
false
|
||||||
val room = matrixClient.getRoom(roomId) ?: return@map false
|
} else {
|
||||||
val mediaSender = MediaSender(preProcessor = mediaPreProcessor, room = room)
|
roomIds
|
||||||
filesToShare
|
.map { roomId ->
|
||||||
.map { fileToShare ->
|
val room = matrixClient.getRoom(roomId) ?: return@map false
|
||||||
mediaSender.sendMedia(
|
val mediaSender = MediaSender(preProcessor = mediaPreProcessor, room = room)
|
||||||
uri = fileToShare.uri,
|
filesToShare
|
||||||
mimeType = fileToShare.mimeType,
|
.map { fileToShare ->
|
||||||
compressIfPossible = true,
|
mediaSender.sendMedia(
|
||||||
).isSuccess
|
uri = fileToShare.uri,
|
||||||
}
|
mimeType = fileToShare.mimeType,
|
||||||
.all { it }
|
compressIfPossible = true,
|
||||||
}
|
).isSuccess
|
||||||
.all { it }
|
}
|
||||||
|
.all { it }
|
||||||
|
}
|
||||||
|
.all { it }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onPlainText = { text ->
|
onPlainText = { text ->
|
||||||
roomIds
|
roomIds
|
||||||
|
|||||||
Reference in New Issue
Block a user