Update sdk for performance increases

This commit is contained in:
Sorunome 2020-07-02 09:30:59 +00:00 committed by Christian Pauly
commit e924908d49
10 changed files with 23 additions and 19 deletions

View file

@ -190,7 +190,7 @@ class _ChatState extends State<_Chat> {
if (file == null) return;
await SimpleDialogs(context).tryRequestWithLoadingDialog(
room.sendFileEvent(
MatrixFile(bytes: file.bytes, path: file.path),
MatrixFile(bytes: file.bytes, name: file.path),
),
);
}
@ -203,8 +203,8 @@ class _ChatState extends State<_Chat> {
maxHeight: 1600);
if (file == null) return;
await SimpleDialogs(context).tryRequestWithLoadingDialog(
room.sendImageEvent(
MatrixFile(bytes: await file.bytes, path: file.path),
room.sendFileEvent(
MatrixImageFile(bytes: await file.bytes, name: file.path),
),
);
}
@ -217,8 +217,8 @@ class _ChatState extends State<_Chat> {
maxHeight: 1600);
if (file == null) return;
await SimpleDialogs(context).tryRequestWithLoadingDialog(
room.sendImageEvent(
MatrixFile(bytes: file.bytes, path: file.path),
room.sendFileEvent(
MatrixImageFile(bytes: file.bytes, name: file.path),
),
);
}
@ -233,8 +233,9 @@ class _ChatState extends State<_Chat> {
if (result == null) return;
final audioFile = File(result);
await SimpleDialogs(context).tryRequestWithLoadingDialog(
room.sendAudioEvent(
MatrixFile(bytes: audioFile.readAsBytesSync(), path: audioFile.path),
room.sendFileEvent(
MatrixAudioFile(
bytes: audioFile.readAsBytesSync(), name: audioFile.path),
),
);
}