Simplify code

This commit is contained in:
Ming Ming 2022-01-02 19:33:55 +08:00
parent 2fb0d6a155
commit 7b95bc7fe7

View file

@ -53,12 +53,8 @@ class ScanDir {
/// Return if this dir should be ignored in a scan op based on files under /// Return if this dir should be ignored in a scan op based on files under
/// this dir /// this dir
static bool _shouldScanIgnoreDir(Iterable<File> files) { static bool _shouldScanIgnoreDir(Iterable<File> files) =>
return files.any((element) { files.any((f) => file_util.isNoMediaMarker(f));
final basename = element.filename;
return basename == ".nomedia" || basename == ".noimage";
});
}
final FileRepo fileRepo; final FileRepo fileRepo;