fix: only upload preview if video streaming enabled

This commit is contained in:
Prateek Sunal
2025-01-28 16:59:01 +05:30
parent 2345265e19
commit 0a3e1087ef

View File

@@ -475,7 +475,7 @@ class FileUploader {
void _uploadPreview(EnteFile file) {
final collection =
CollectionsService.instance.getCollectionByID(file.collectionID!);
if (collection?.displayName == "Camera") {
if (Platform.isIOS || collection?.displayName == "Camera") {
unawaited(
_previewVideoStore.chunkAndUploadVideo(null, file),
);
@@ -749,7 +749,9 @@ class FileUploader {
throw SyncStopRequestedError();
}
_uploadPreview(file);
if (PreviewVideoStore.instance.isVideoStreamingEnabled) {
_uploadPreview(file);
}
EnteFile remoteFile;
if (isUpdatedFile) {
remoteFile = await _updateFile(