Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Hide Play original option when showing memories

AmanRajSinghMourya6405886acaf6
diff --git a/mobile/lib/ui/viewer/file/video_widget_native.dart b/mobile/lib/ui/viewer/file/video_widget_native.dart
index 3ea44a797c..b3e6de3b54 100644
--- a/mobile/lib/ui/viewer/file/video_widget_native.dart
+++ b/mobile/lib/ui/viewer/file/video_widget_native.dart
@@ -372,64 +372,73 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>
)
: const SizedBox();
},
- valueListenable: _isPlaybackReady,
+ valueListenable: _isPlaybackReady,
),
),
),
- Positioned(
- bottom: verticalMargin,
- right: 0,
- left: 0,
- child: SafeArea(
- top: false,
- left: false,
- right: false,
- child: Padding(
- padding: EdgeInsets.only(
- bottom: widget.isFromMemories ? 32 : 0,
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- _VideoDescriptionAndSwitchToMediaKitButton(
- file: widget.file,
- showControls: _showControls,
- elTooltipController: _elTooltipController,
- controller: _controller,
- selectedPreview: widget.selectedPreview,
- ),
- ValueListenableBuilder(
- valueListenable: _showControls,
- builder: (context, value, _) {
- return VideoStreamChangeWidget(
- showControls: value,
- file: widget.file,
- isPreviewPlayer: widget.selectedPreview,
- onStreamChange: widget.onStreamChange,
- );
- },
- ),
- ValueListenableBuilder(
- valueListenable: _isPlaybackReady,
- builder:
- (BuildContext context, bool value, _) {
- return value && !widget.isFromMemories
- ? _SeekBarAndDuration(
- controller: _controller,
- duration: duration,
- showControls: _showControls,
- isSeeking: _isSeeking,
- position: position,
+ widget.isFromMemories
+ ? const SizedBox.shrink()
+ : Positioned(
+ bottom: verticalMargin,
+ right: 0,
+ left: 0,
+ child: SafeArea(
+ top: false,
+ left: false,
+ right: false,
+ child: Padding(
+ padding: EdgeInsets.only(
+ bottom: widget.isFromMemories ? 32 : 0,
+ ),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
+ children: [
+ _VideoDescriptionAndSwitchToMediaKitButton(
+ file: widget.file,
+ showControls: _showControls,
+ elTooltipController:
+ _elTooltipController,
+ controller: _controller,
+ selectedPreview: widget.selectedPreview,
+ ),
+ ValueListenableBuilder(
+ valueListenable: _showControls,
+ builder: (context, value, _) {
+ return VideoStreamChangeWidget(
+ showControls: value,
file: widget.file,
- )
- : const SizedBox();
- },
+ isPreviewPlayer:
+ widget.selectedPreview,
+ onStreamChange:
+ widget.onStreamChange,
+ );
+ },
+ ),
+ ValueListenableBuilder(
+ valueListenable: _isPlaybackReady,
+ builder: (
+ BuildContext context,
+ bool value,
+ _,
+ ) {
+ return value
+ ? _SeekBarAndDuration(
+ controller: _controller,
+ duration: duration,
+ showControls: _showControls,
+ isSeeking: _isSeeking,
+ position: position,
+ file: widget.file,
+ )
+ : const SizedBox();
+ },
+ ),
+ ],
+ ),
),
- ],
+ ),
),
- ),
- ),
- ),
],
),
),