π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: append to a set if already compressing
Prateek Sunal6e258490fe44
diff --git a/mobile/lib/services/preview_video_store.dart b/mobile/lib/services/preview_video_store.dartindex 3699cc37da..89eb509f79 100644--- a/mobile/lib/services/preview_video_store.dart+++ b/mobile/lib/services/preview_video_store.dart@@ -35,6 +35,8 @@ class PreviewVideoStore {final videoCacheManager = VideoCacheManager.instance;double _progress = 0;+ final files = <EnteFile>{};+final _dio = NetworkClient.instance.enteDio;void init() {VideoCompress.compressProgress$.subscribe((progress) {@@ -68,11 +70,14 @@ class PreviewVideoStore {rethrow;}}- if (VideoCompress.isCompressing && ctx != null) {- showShortToast(- ctx,- "Another is being compressed ($_progress %), please wait",- );+ if (VideoCompress.isCompressing) {+ files.add(enteFile);+ if (ctx != null) {+ showShortToast(+ ctx,+ "Another is being compressed ($_progress %), please wait",+ );+ }return;}final String tempDir = Configuration.instance.getTempDirectory();@@ -152,6 +157,12 @@ class PreviewVideoStore {_logger.severe(output);}}++ if (files.isNotEmpty) {+ final file = files.first;+ files.remove(file);+ await chunkAndUploadVideo(ctx, file);+ }}Future<void> _reportVideoPreview(