fix: Don't double-confirm sending audio messages
This commit is contained in:
parent
2bed74411d
commit
d2c883488e
1 changed files with 8 additions and 7 deletions
|
|
@ -253,13 +253,14 @@ class _ChatState extends State<_Chat> {
|
||||||
));
|
));
|
||||||
if (result == null) return;
|
if (result == null) return;
|
||||||
final audioFile = File(result);
|
final audioFile = File(result);
|
||||||
await showDialog(
|
// as we already explicitly say send in the recording dialog,
|
||||||
context: context,
|
// we do not need the send file dialog anymore. We can just send this straight away.
|
||||||
builder: (context) => SendFileDialog(
|
await SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||||
file: MatrixAudioFile(
|
room.sendFileEvent(
|
||||||
bytes: audioFile.readAsBytesSync(), name: audioFile.path),
|
MatrixAudioFile(
|
||||||
room: room,
|
bytes: audioFile.readAsBytesSync(), name: audioFile.path),
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String _getSelectedEventString(BuildContext context) {
|
String _getSelectedEventString(BuildContext context) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue