Fixed picking a GIF from the keyboard while inside a chat room

This commit is contained in:
Sylvain Berfini 2021-01-12 15:13:39 +01:00
parent 0f3c9fb2a0
commit 90b1f522ae

View file

@ -298,8 +298,13 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin
sharedViewModel.filesToShare.value = list
}
// Check that the current fragment hasn't already handled the event on filesToShare
// If it has, don't go further.
// For example this may happen when picking a GIF from the keyboard while inside a chat room
if (!sharedViewModel.filesToShare.value.isNullOrEmpty()) {
handleSendChatRoom(intent)
}
}
private suspend fun handleSendMultipleFiles(intent: Intent) {
if (corePreferences.disableChat) return