diff --git a/lib/pages/chat/send_file_dialog.dart b/lib/pages/chat/send_file_dialog.dart index e5f070fd7..b2885a635 100644 --- a/lib/pages/chat/send_file_dialog.dart +++ b/lib/pages/chat/send_file_dialog.dart @@ -37,7 +37,7 @@ class SendFileDialogState extends State { await showFutureLoadingDialog( context: context, future: () async { - file = await file.resizeVideo(); + file = origImage ? file : await file.resizeVideo(); thumbnail = await file.getVideoThumbnail(); }, ); @@ -126,6 +126,38 @@ class SendFileDialogState extends State { ), ], ); + } else if (widget.files.every((file) => file is MatrixVideoFile)) { + contentWidget = Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text(fileName), + const SizedBox(height: 16), + // Workaround for SwitchListTile.adaptive crashes in CupertinoDialog + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CupertinoSwitch( + value: origImage, + onChanged: (v) => setState(() => origImage = v), + ), + const SizedBox(width: 16), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + L10n.of(context)!.sendOriginal, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + Text(sizeString), + ], + ), + ), + ], + ), + ], + ); } else { contentWidget = Text('$fileName ($sizeString)'); }