Handle no uri to share case.

This commit is contained in:
Benoit Marty
2024-06-06 09:44:57 +02:00
parent f9508f8472
commit 66daa63d86
@@ -75,6 +75,9 @@ class SharePresenter @AssistedInject constructor(
val result = shareIntentHandler.handleIncomingShareIntent( val result = shareIntentHandler.handleIncomingShareIntent(
intent, intent,
onUris = { filesToShare -> onUris = { filesToShare ->
if (filesToShare.isEmpty()) {
false
} else {
roomIds roomIds
.map { roomId -> .map { roomId ->
val room = matrixClient.getRoom(roomId) ?: return@map false val room = matrixClient.getRoom(roomId) ?: return@map false
@@ -90,6 +93,7 @@ class SharePresenter @AssistedInject constructor(
.all { it } .all { it }
} }
.all { it } .all { it }
}
}, },
onPlainText = { text -> onPlainText = { text ->
roomIds roomIds