🐛 Fix bugs and don't know what has been fixed

This commit is contained in:
2025-07-11 00:44:08 +08:00
parent f2d2a9efd8
commit 6d06f0a1b4
12 changed files with 269 additions and 66 deletions

View File

@@ -37,13 +37,10 @@ class CloudFileList extends HookConsumerWidget {
double calculateAspectRatio() {
double total = 0;
for (var ratio in files.map(
(e) =>
e.fileMeta?['ratio'] ??
((e.mimeType?.startsWith('image') ?? false) ? 1 : 16 / 9),
)) {
for (var ratio in files.map((e) => e.fileMeta?['ratio'] ?? 1)) {
total += ratio;
}
if (total == 0) return 1;
return total / files.length;
}