forked from Nexus/nexus
move attachment sending check to be earlier
fixes sending with keyboard before attachment uploaded
This commit is contained in:
parent
f0f426a647
commit
d7f49568a7
2 changed files with 7 additions and 6 deletions
|
|
@ -59,7 +59,10 @@ class Composer extends HookConsumerWidget {
|
|||
final attachment = ref.watch(AttachmentController.provider(roomId));
|
||||
|
||||
void send() {
|
||||
if (controller.value.text.isEmpty && attachment == null) return;
|
||||
if (controller.value.text.isEmpty && attachment == null ||
|
||||
attachment != null && attachment.$2 == null) {
|
||||
return;
|
||||
}
|
||||
onSend(
|
||||
controller.value.formattedText,
|
||||
shouldMention: shouldMention.value,
|
||||
|
|
|
|||
Loading…
Reference in a new issue