From d561ce647e2203ff15cbcd01b1ecb83a0becc54f Mon Sep 17 00:00:00 2001 From: otsmr Date: Thu, 29 May 2025 23:32:05 +0200 Subject: [PATCH] fix #181 --- lib/src/views/chats/media_viewer_view.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/src/views/chats/media_viewer_view.dart b/lib/src/views/chats/media_viewer_view.dart index 187e3bd..f4f93f1 100644 --- a/lib/src/views/chats/media_viewer_view.dart +++ b/lib/src/views/chats/media_viewer_view.dart @@ -228,14 +228,19 @@ class _MediaViewerViewState extends State { videoController?.setLooping(content.maxShowTime == gMediaShowInfinite); videoController?.initialize().then((_) { videoController!.play(); - if (content.maxShowTime != gMediaShowInfinite) { - videoController?.addListener(() { + videoController?.addListener(() { + setState(() { + progress = 1 - + videoController!.value.position.inSeconds / + videoController!.value.duration.inSeconds; + }); + if (content.maxShowTime != gMediaShowInfinite) { if (videoController?.value.position == videoController?.value.duration) { nextMediaOrExit(); } - }); - } + } + }); setState(() { videoPath = videoPathTmp.path; }); @@ -560,7 +565,7 @@ class _MediaViewerViewState extends State { ), ), ), - if (canBeSeenUntil != null) + if (canBeSeenUntil != null || progress >= 0) Positioned( right: 20, top: 27,