allow sending messages without a body if they have an attachment
This commit is contained in:
parent
bd1bad76d7
commit
a8726feef6
1 changed files with 3 additions and 3 deletions
|
|
@ -56,8 +56,10 @@ class Composer extends HookConsumerWidget {
|
|||
};
|
||||
}
|
||||
|
||||
final attachment = ref.watch(AttachmentController.provider(roomId));
|
||||
|
||||
void send() {
|
||||
if (controller.value.text.isEmpty) return;
|
||||
if (controller.value.text.isEmpty && attachment == null) return;
|
||||
onSend(
|
||||
controller.value.formattedText,
|
||||
shouldMention: shouldMention.value,
|
||||
|
|
@ -73,8 +75,6 @@ class Composer extends HookConsumerWidget {
|
|||
fontWeight: .bold,
|
||||
);
|
||||
|
||||
final attachment = ref.watch(AttachmentController.provider(roomId));
|
||||
|
||||
return Padding(
|
||||
padding: .all(12),
|
||||
child: Column(
|
||||
|
|
|
|||
Loading…
Reference in a new issue