From 01fc3fc414d9cc44291a1c13fb7f3ac4bac6edba Mon Sep 17 00:00:00 2001 From: Airyz <36567925+Airyzz@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:58:37 +0930 Subject: [PATCH] Small fixes for video attachments --- .../molecules/video_player/video_player_implementation.dart | 2 +- .../attachment_processor/attachment_processor.dart | 6 ++++++ tiamat/lib/atoms/panel.dart | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/commet/lib/ui/molecules/video_player/video_player_implementation.dart b/commet/lib/ui/molecules/video_player/video_player_implementation.dart index dab55062..b0802811 100644 --- a/commet/lib/ui/molecules/video_player/video_player_implementation.dart +++ b/commet/lib/ui/molecules/video_player/video_player_implementation.dart @@ -111,6 +111,6 @@ class _VideoPlayerImplementationState extends State { } return Size( - player.state.height!.toDouble(), player.state.width!.toDouble()); + player.state.width!.toDouble(), player.state.height!.toDouble()); } } diff --git a/commet/lib/ui/organisms/attachment_processor/attachment_processor.dart b/commet/lib/ui/organisms/attachment_processor/attachment_processor.dart index de9bbd5a..8ae8e1e3 100644 --- a/commet/lib/ui/organisms/attachment_processor/attachment_processor.dart +++ b/commet/lib/ui/organisms/attachment_processor/attachment_processor.dart @@ -61,6 +61,12 @@ class _AttachmentProcessorState extends State { super.initState(); } + @override + void dispose() { + videoController?.pause(); + super.dispose(); + } + void loadExif() async { late Map data; if (widget.attachment.data != null) { diff --git a/tiamat/lib/atoms/panel.dart b/tiamat/lib/atoms/panel.dart index b783c031..e295452e 100644 --- a/tiamat/lib/atoms/panel.dart +++ b/tiamat/lib/atoms/panel.dart @@ -83,7 +83,11 @@ class Panel extends StatelessWidget { padding: const EdgeInsets.fromLTRB(8, 8, 0, 0), child: Align( alignment: Alignment.centerLeft, - child: tiamat.Text.labelLow(header!)), + child: tiamat.Text.labelLow( + header!, + maxLines: 1, + overflow: TextOverflow.ellipsis, + )), ), if (header != null) Padding(