🐛 Fix local db old data cause crash

This commit is contained in:
2024-08-19 09:19:29 +08:00
parent 7ea18dbe12
commit 0006a94632
5 changed files with 28 additions and 8 deletions

View File

@ -72,6 +72,7 @@ class _AttachmentListState extends State<AttachmentList> {
double? consistentValue;
int portrait = 0, square = 0, landscape = 0;
for (var entry in _attachmentsMeta) {
if (entry == null) continue;
if (entry!.metadata?['ratio'] != null) {
if (entry.metadata?['ratio'] is int) {
consistentValue ??= entry.metadata?['ratio'].toDouble();