π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix UX issue with video controls when viewing a video memory
ashilkna905a1fa4461
diff --git a/mobile/lib/ui/home/memories/full_screen_memory.dart b/mobile/lib/ui/home/memories/full_screen_memory.dartindex a46d542606..c8e69b58d8 100644--- a/mobile/lib/ui/home/memories/full_screen_memory.dart+++ b/mobile/lib/ui/home/memories/full_screen_memory.dart@@ -268,7 +268,6 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {backgroundDecoration: const BoxDecoration(color: Colors.transparent,),- isFromMemories: true,),);},diff --git a/mobile/lib/ui/viewer/file/detail_page.dart b/mobile/lib/ui/viewer/file/detail_page.dartindex a4f9a26cc4..7e8795c978 100644--- a/mobile/lib/ui/viewer/file/detail_page.dart+++ b/mobile/lib/ui/viewer/file/detail_page.dart@@ -276,7 +276,6 @@ class _DetailPageState extends State<DetailPage> {});},backgroundDecoration: const BoxDecoration(color: Colors.black),- isFromMemories: false,);return GestureDetector(onTap: () {diff --git a/mobile/lib/ui/viewer/file/file_widget.dart b/mobile/lib/ui/viewer/file/file_widget.dartindex b798aedf12..387bbad91b 100644--- a/mobile/lib/ui/viewer/file/file_widget.dart+++ b/mobile/lib/ui/viewer/file/file_widget.dart@@ -12,7 +12,6 @@ class FileWidget extends StatelessWidget {final Function(bool)? playbackCallback;final BoxDecoration? backgroundDecoration;final bool? autoPlay;- final bool isFromMemories;const FileWidget(this.file, {@@ -21,7 +20,6 @@ class FileWidget extends StatelessWidget {this.playbackCallback,this.tagPrefix,this.backgroundDecoration,- required this.isFromMemories,super.key,});diff --git a/mobile/lib/ui/viewer/file/video_widget_native.dart b/mobile/lib/ui/viewer/file/video_widget_native.dartindex b5bea96495..c76d9d5e5e 100644--- a/mobile/lib/ui/viewer/file/video_widget_native.dart+++ b/mobile/lib/ui/viewer/file/video_widget_native.dart@@ -200,12 +200,12 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>),GestureDetector(behavior: HitTestBehavior.opaque,- onTap: widget.playbackCallback != null- ? () {- _showControls.value = !_showControls.value;- widget.playbackCallback!(!_showControls.value);- }- : null,+ onTap: () {+ _showControls.value = !_showControls.value;+ if (widget.playbackCallback != null) {+ widget.playbackCallback!(!_showControls.value);+ }+ },child: Container(constraints: const BoxConstraints.expand(),),@@ -310,7 +310,9 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>return;}_showControls.value = false;- widget.playbackCallback!(true);+ if (widget.playbackCallback != null) {+ widget.playbackCallback!(true);+ }}});}@@ -321,7 +323,7 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>return;}if (_controller!.playbackInfo?.status == PlaybackStatus.playing) {- if (widget.playbackCallback != null && mounted) {+ if (mounted) {_debouncer.run(() async {if (mounted) {if (_isSeeking.value ||@@ -329,7 +331,9 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>return;}_showControls.value = false;- widget.playbackCallback!(true);+ if (widget.playbackCallback != null) {+ widget.playbackCallback!(true);+ }}});}@@ -379,7 +383,11 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>_setFilePathForNativePlayer(file.path);}}).onError((error, stackTrace) {- showErrorDialog(context, S.of(context).error, S.of(context).failedToDownloadVideo);+ showErrorDialog(+ context,+ S.of(context).error,+ S.of(context).failedToDownloadVideo,+ );});}