π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Show download progress for internal users
Neeraj Gupta34b53f844378
diff --git a/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dart b/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dartindex 97fb663577..6236abbced 100644--- a/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dart+++ b/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dart@@ -18,6 +18,7 @@ import "package:photos/service_locator.dart";import "package:photos/services/files_service.dart";import "package:photos/services/wake_lock_service.dart";import "package:photos/theme/colors.dart";+import "package:photos/theme/ente_theme.dart";import "package:photos/ui/actions/file/file_actions.dart";import "package:photos/ui/common/loading_widget.dart";import "package:photos/ui/notification/toast.dart";@@ -196,11 +197,40 @@ class _VideoWidgetMediaKitNewState extends State<VideoWidgetMediaKitNew>onStreamChange: widget.onStreamChange,isPreviewPlayer: widget.selectedPreview,)- : const Center(- child: EnteLoadingWidget(- size: 32,- color: fillBaseDark,- padding: 0,+ : Center(+ child: ValueListenableBuilder(+ valueListenable: _progressNotifier,+ builder: (BuildContext context, double? progress, _) {+ return progress == null || progress == 1+ ? const EnteLoadingWidget(+ size: 32,+ color: fillBaseDark,+ padding: 0,+ )+ : Stack(+ children: [+ CircularProgressIndicator(+ backgroundColor: Colors.transparent,+ value: progress,+ valueColor: const AlwaysStoppedAnimation<Color>(+ Color.fromRGBO(45, 194, 98, 1.0),+ ),+ strokeWidth: 2,+ strokeCap: StrokeCap.round,+ ),+ if (flagService.internalUser)+ Center(+ child: Text(+ "${(progress * 100).toStringAsFixed(0)}%",+ style:+ getEnteTextTheme(context).tiny.copyWith(+ color: textBaseDark,+ ),+ ),+ ),+ ],+ );+ },),),),diff --git a/mobile/lib/ui/viewer/file/video_widget_native.dart b/mobile/lib/ui/viewer/file/video_widget_native.dartindex 68653265c7..e459526aaa 100644--- a/mobile/lib/ui/viewer/file/video_widget_native.dart+++ b/mobile/lib/ui/viewer/file/video_widget_native.dart@@ -598,14 +598,27 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>color: fillBaseDark,padding: 0,)- : CircularProgressIndicator(- backgroundColor: Colors.transparent,- value: progress,- valueColor: const AlwaysStoppedAnimation<Color>(- Color.fromRGBO(45, 194, 98, 1.0),- ),- strokeWidth: 2,- strokeCap: StrokeCap.round,+ : Stack(+ children: [+ CircularProgressIndicator(+ backgroundColor: Colors.transparent,+ value: progress,+ valueColor: const AlwaysStoppedAnimation<Color>(+ Color.fromRGBO(45, 194, 98, 1.0),+ ),+ strokeWidth: 2,+ strokeCap: StrokeCap.round,+ ),+ if (flagService.internalUser)+ Center(+ child: Text(+ "${(progress * 100).toStringAsFixed(0)}%",+ style: getEnteTextTheme(context).tiny.copyWith(+ color: textBaseDark,+ ),+ ),+ ),+ ],);},),