fix: logic for queuing and item removal

This commit is contained in:
Prateek Sunal
2025-02-18 14:09:39 +05:30
parent 0e157a4e33
commit ce5a8f0457

View File

@@ -596,8 +596,10 @@ class PreviewVideoStore {
final codecIsH264 = codec?.contains("h264") ?? false;
if (codecIsH264) {
_items.removeWhere((key, value) => value.file == enteFile);
Bus.instance.fire(PreviewUpdatedEvent(_items));
if (_items.containsKey(enteFile.uploadedFileID!)) {
_items.remove(enteFile.uploadedFileID!);
Bus.instance.fire(PreviewUpdatedEvent(_items));
}
return (props, true);
}
}
@@ -634,6 +636,7 @@ class PreviewVideoStore {
final (_, result) = await checkFileForPreviewCreation(enteFile);
if (result) {
allFiles.remove(enteFile);
continue;
}