🐛 Fix attachment list NaN height

This commit is contained in:
2024-12-29 14:03:19 +08:00
parent 7fbd4e9647
commit a6d4947a23
4 changed files with 16 additions and 16 deletions

View File

@ -354,9 +354,11 @@ class PostWriteController extends ChangeNotifier {
);
try {
final compressedAttachment = await _tryCompressVideoCopy(context, media);
if (compressedAttachment != null) {
item = await attach.updateOne(item, compressedId: compressedAttachment.id);
if (context.mounted) {
final compressedAttachment = await _tryCompressVideoCopy(context, media);
if (compressedAttachment != null) {
item = await attach.updateOne(item, compressedId: compressedAttachment.id);
}
}
} catch (err) {
if (context.mounted) context.showErrorDialog(err);