π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix UI for native video player on memories
ashilkncbdf6ea0e31d
diff --git a/mobile/lib/ui/home/memories/full_screen_memory.dart b/mobile/lib/ui/home/memories/full_screen_memory.dartindex c8e69b58d8..a46d542606 100644--- a/mobile/lib/ui/home/memories/full_screen_memory.dart+++ b/mobile/lib/ui/home/memories/full_screen_memory.dart@@ -268,6 +268,7 @@ 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 521a12ea69..90ad061238 100644--- a/mobile/lib/ui/viewer/file/detail_page.dart+++ b/mobile/lib/ui/viewer/file/detail_page.dart@@ -215,6 +215,7 @@ 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 7f91efa8a5..40dea9342d 100644--- a/mobile/lib/ui/viewer/file/file_widget.dart+++ b/mobile/lib/ui/viewer/file/file_widget.dart@@ -13,6 +13,7 @@ class FileWidget extends StatelessWidget {final Function(bool)? playbackCallback;final BoxDecoration? backgroundDecoration;final bool? autoPlay;+ final bool isFromMemories;const FileWidget(this.file, {@@ -21,6 +22,7 @@ class FileWidget extends StatelessWidget {this.playbackCallback,this.tagPrefix,this.backgroundDecoration,+ required this.isFromMemories,Key? key,}) : super(key: key);diff --git a/mobile/lib/ui/viewer/file/video_widget_native.dart b/mobile/lib/ui/viewer/file/video_widget_native.dartindex 9644ea2dd2..9fe20b1b6d 100644--- a/mobile/lib/ui/viewer/file/video_widget_native.dart+++ b/mobile/lib/ui/viewer/file/video_widget_native.dart@@ -32,10 +32,12 @@ class VideoWidgetNative extends StatefulWidget {final EnteFile file;final String? tagPrefix;final Function(bool)? playbackCallback;+ final bool isFromMemories;const VideoWidgetNative(this.file, {this.tagPrefix,this.playbackCallback,+ this.isFromMemories = false,super.key,});@@ -239,104 +241,114 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>bottom: verticalMargin,right: 0,left: 0,- child: ValueListenableBuilder(- builder: (BuildContext context, bool value, _) {- return value- ? ValueListenableBuilder(- valueListenable: _showControls,- builder:- (BuildContext context, bool value, _) {- return AnimatedOpacity(- duration: const Duration(- milliseconds: 200,- ),- curve: Curves.easeInQuad,- opacity: value ? 1 : 0,- child: IgnorePointer(- ignoring: !value,- child: Padding(- padding: const EdgeInsets.symmetric(- horizontal: 8,- ),- child: Container(+ child: Padding(+ padding: EdgeInsets.only(+ bottom: widget.isFromMemories ? 0 : 32,+ ),+ child: ValueListenableBuilder(+ builder: (BuildContext context, bool value, _) {+ return value+ ? ValueListenableBuilder(+ valueListenable: _showControls,+ builder: (+ BuildContext context,+ bool value,+ _,+ ) {+ return AnimatedOpacity(+ duration: const Duration(+ milliseconds: 200,+ ),+ curve: Curves.easeInQuad,+ opacity: value ? 1 : 0,+ child: IgnorePointer(+ ignoring: !value,+ child: Padding(padding:- const EdgeInsets.fromLTRB(- 16,- 4,- 16,- 4,+ const EdgeInsets.symmetric(+ horizontal: 8,),- decoration: BoxDecoration(- color: Colors.black- .withOpacity(0.3),- borderRadius:- const BorderRadius.all(- Radius.circular(8),- ),- border: Border.all(- color: strokeFaintDark,- width: 1,+ child: Container(+ padding:+ const EdgeInsets.fromLTRB(+ 16,+ 4,+ 16,+ 4,),- ),- child: Row(- children: [- AnimatedSize(- duration: const Duration(- seconds: 5,- ),- curve: Curves.easeInOut,- child:- ValueListenableBuilder(- valueListenable: _controller!- .onPlaybackPositionChanged,- builder: (- BuildContext context,- int value,- _,- ) {- return Text(- secondsToDuration(- value,- ),- style:- getEnteTextTheme(- context,- ).mini.copyWith(- color:- textBaseDark,- ),- );- },- ),+ decoration: BoxDecoration(+ color: Colors.black+ .withOpacity(0.3),+ borderRadius:+ const BorderRadius.all(+ Radius.circular(8),),- Expanded(- child: SeekBar(- _controller!,- _durationToSeconds(- duration,+ border: Border.all(+ color: strokeFaintDark,+ width: 1,+ ),+ ),+ child: Row(+ children: [+ AnimatedSize(+ duration: const Duration(+ seconds: 5,+ ),+ curve: Curves.easeInOut,+ child:+ ValueListenableBuilder(+ valueListenable:+ _controller!+ .onPlaybackPositionChanged,+ builder: (+ BuildContext context,+ int value,+ _,+ ) {+ return Text(+ secondsToDuration(+ value,+ ),+ style:+ getEnteTextTheme(+ context,+ ).mini.copyWith(+ color:+ textBaseDark,+ ),+ );+ },),- _isSeeking,),- ),- Text(- duration ?? "0:00",- style: getEnteTextTheme(- context,- ).mini.copyWith(- color: textBaseDark,+ Expanded(+ child: SeekBar(+ _controller!,+ _durationToSeconds(+ duration,),- ),- ],+ _isSeeking,+ ),+ ),+ Text(+ duration ?? "0:00",+ style: getEnteTextTheme(+ context,+ ).mini.copyWith(+ color: textBaseDark,+ ),+ ),+ ],+ ),),),),- ),- );- },- )- : const SizedBox();- },- valueListenable: _isPlaybackReady,+ );+ },+ )+ : const SizedBox();+ },+ valueListenable: _isPlaybackReady,+ ),),),],