💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Clean up video export analyzer warnings
Prateek Sunalc0d88a1c4373
diff --git a/mobile/apps/photos/lib/ui/tools/editor/export_video_service.dart b/mobile/apps/photos/lib/ui/tools/editor/export_video_service.dartindex d5240d2cb0..131ef0f6f0 100644--- a/mobile/apps/photos/lib/ui/tools/editor/export_video_service.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/export_video_service.dart@@ -3,7 +3,6 @@ import 'dart:io';import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';import 'package:ffmpeg_kit_flutter/ffmpeg_session.dart';-import 'package:ffmpeg_kit_flutter/log.dart';import 'package:ffmpeg_kit_flutter/return_code.dart';import 'package:ffmpeg_kit_flutter/session_state.dart';import 'package:ffmpeg_kit_flutter/statistics.dart';diff --git a/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dart b/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dartindex 3b33669e6a..bfc4af340b 100644--- a/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dart@@ -109,10 +109,13 @@ class _VideoEditorPageState extends State<VideoEditorPage> {}setState(() {});})- .catchError((error) {- // handle minumum duration bigger than video duration error- Navigator.pop(context);- }, test: (e) => e is VideoMinDurationError);+ .catchError(+ (error) {+ // handle minimum duration bigger than video duration error+ Navigator.pop(context);+ },+ test: (e) => e is VideoMinDurationError,+ );});}@@ -422,11 +425,14 @@ class _VideoEditorPageState extends State<VideoEditorPage> {continue;}- throw error;+ rethrow;}}- throw lastError ?? Exception("Unknown native export failure");+ if (lastError != null) {+ Error.throwWithStackTrace(lastError, lastStackTrace ?? StackTrace.current);+ }+ throw Exception("Unknown native export failure");}Future<File> _runFfmpegExportWithRetry({@@ -485,11 +491,14 @@ class _VideoEditorPageState extends State<VideoEditorPage> {continue;}- throw error;+ rethrow;}}- throw lastError ?? Exception("Unknown FFmpeg export failure");+ if (lastError != null) {+ Error.throwWithStackTrace(lastError, lastStackTrace ?? StackTrace.current);+ }+ throw Exception("Unknown FFmpeg export failure");}Future<File> _runFfmpegExportAttempt({@@ -646,7 +655,7 @@ class _VideoEditorPageState extends State<VideoEditorPage> {"${controller.preferredCropAspectRatio != null ? ", aspectRatio=${controller.preferredCropAspectRatio!.toStringAsFixed(3)}" : ""}";_logger.info(- "Export starting (native=$shouldUseNative) rotation=${rotation}°, "+ "Export starting (native=$shouldUseNative) rotation=$rotation°, ""trim={startMs:$startTrimMs, endMs:$endTrimMs, durationMs:$trimmedDurationMs, ""min:${minTrim.toStringAsFixed(3)}, max:${maxTrim.toStringAsFixed(3)}, ""videoDurationMs:$videoDurationMs} "