🐛 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

@ -39,7 +39,7 @@ class ChatEvent extends StatelessWidget {
Widget _buildAttachment(BuildContext context, {bool isMinimal = false}) {
final attachments = item.body['attachments'] != null
? List<String>.from(item.body['attachments'].map((x) => x))
? List<String>.from(item.body['attachments']?.whereType<String>())
: List<String>.empty();
if (attachments.isEmpty) return const SizedBox();