mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-13 18:58:53 +01:00
Fix scan bloc not actaully filtering duplicated query events
This commit is contained in:
parent
3308e91133
commit
42f5ce5a67
1 changed files with 3 additions and 5 deletions
|
@ -124,16 +124,14 @@ class ScanAccountDirBloc
|
|||
_imageProcessorUploadSuccessListener?.begin();
|
||||
|
||||
on<ScanAccountDirBlocEvent>(_onEvent, transformer: ((events, mapper) {
|
||||
return events.asyncExpand(mapper).distinct((a, b) {
|
||||
return events.distinct((a, b) {
|
||||
// only handle ScanAccountDirBlocQuery
|
||||
final r = a is ScanAccountDirBlocQuery &&
|
||||
b is ScanAccountDirBlocQuery &&
|
||||
a == b;
|
||||
final r = a is ScanAccountDirBlocQuery && b is ScanAccountDirBlocQuery;
|
||||
if (r) {
|
||||
_log.fine("[on] Skip identical ScanAccountDirBlocQuery event");
|
||||
}
|
||||
return r;
|
||||
});
|
||||
}).asyncExpand(mapper);
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue