TF-83 Fix show message constraints when sending a message
This commit is contained in:
@@ -3,12 +3,8 @@ import 'package:model/model.dart';
|
||||
extension ListAttachmentExtension on List<Attachment> {
|
||||
|
||||
num totalSize() {
|
||||
num totalSize = 0;
|
||||
forEach((attachment) {
|
||||
if (attachment.size != null) {
|
||||
totalSize += attachment.size!.value;
|
||||
}
|
||||
});
|
||||
final currentListSize = map((attachment) => attachment.size?.value ?? 0).toList();
|
||||
final totalSize = currentListSize.reduce((sum, size) => sum + size);
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user