refactor: Recording dialog
This commit is contained in:
parent
be0fbd5ab0
commit
3286b19387
2 changed files with 21 additions and 23 deletions
|
|
@ -621,10 +621,10 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => const RecordingDialog(),
|
||||
);
|
||||
if (result == null) return;
|
||||
final audioFile = File(result.path);
|
||||
final audioFile = XFile(result.path);
|
||||
final file = MatrixAudioFile(
|
||||
bytes: audioFile.readAsBytesSync(),
|
||||
name: audioFile.path,
|
||||
bytes: await audioFile.readAsBytes(),
|
||||
name: result.fileName ?? audioFile.path,
|
||||
);
|
||||
await room.sendFileEvent(
|
||||
file,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue