mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 20:07:55 -06:00
fix removing single file from scanned pages
Removing a single file from scanned pages failed with UnmodifiableListMixin.remove (dart:_internal/list.dart:134) This filters the list instead of trying to remove from it. fixes #395 Signed-off-by: Jörg Vehlow <joerg@jv-coder.de>
This commit is contained in:
@@ -64,7 +64,7 @@ class DocumentScannerCubit extends Cubit<DocumentScannerState> {
|
|||||||
stackTrace: stackTrace,
|
stackTrace: stackTrace,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final scans = state.scans..remove(file);
|
final scans = state.scans.where((f) => f != file).toList();
|
||||||
emit(
|
emit(
|
||||||
scans.isEmpty
|
scans.isEmpty
|
||||||
? const DocumentScannerState()
|
? const DocumentScannerState()
|
||||||
|
|||||||
Reference in New Issue
Block a user