fix: Send file
This commit is contained in:
parent
b86e88ef87
commit
77020d6b91
5 changed files with 25 additions and 22 deletions
|
|
@ -214,12 +214,13 @@ class _ChatState extends State<Chat> {
|
|||
if (result == null) return;
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (context) => SendFileDialog(
|
||||
builder: (c) => SendFileDialog(
|
||||
file: MatrixFile(
|
||||
bytes: result.toUint8List(),
|
||||
name: result.fileName,
|
||||
).detectFileType,
|
||||
room: room,
|
||||
l10n: L10n.of(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -230,12 +231,13 @@ class _ChatState extends State<Chat> {
|
|||
if (result == null) return;
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (context) => SendFileDialog(
|
||||
builder: (c) => SendFileDialog(
|
||||
file: MatrixImageFile(
|
||||
bytes: result.toUint8List(),
|
||||
name: result.fileName,
|
||||
),
|
||||
room: room,
|
||||
l10n: L10n.of(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -246,12 +248,13 @@ class _ChatState extends State<Chat> {
|
|||
final bytes = await file.readAsBytes();
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (context) => SendFileDialog(
|
||||
builder: (c) => SendFileDialog(
|
||||
file: MatrixImageFile(
|
||||
bytes: bytes,
|
||||
name: file.path,
|
||||
),
|
||||
room: room,
|
||||
l10n: L10n.of(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue