Remove obsolete argument

This commit is contained in:
Ming Ming 2022-01-19 13:08:48 +08:00
parent c69692e35b
commit 2dcfe4a261
2 changed files with 5 additions and 20 deletions

View file

@ -15,23 +15,15 @@ class ScanDir {
///
/// Dirs with a .nomedia/.noimage file will be ignored. The returned stream
/// would emit either List<File> or ExceptionEvent
///
/// If [isSupportedFileOnly] == true, the returned files will be filtered by
/// [file_util.isSupportedFormat]
Stream<dynamic> call(
Account account,
File root, {
bool isSupportedFileOnly = true,
}) async* {
Stream<dynamic> call(Account account, File root) async* {
try {
final items = await Ls(fileRepo)(account, root);
if (_shouldScanIgnoreDir(items)) {
return;
}
yield items
.where((f) =>
f.isCollection != true &&
(!isSupportedFileOnly || file_util.isSupportedFormat(f)))
.where(
(f) => f.isCollection != true && file_util.isSupportedFormat(f))
.toList();
for (final i in items.where((element) =>
element.isCollection == true &&

View file

@ -15,15 +15,8 @@ class ScanDirOffline {
/// List all files under a dir recursively from the local DB
///
/// Dirs with a .nomedia/.noimage file will be ignored.
///
/// If [isSupportedFileOnly] == true, the returned files will be filtered by
/// [file_util.isSupportedFormat]
Future<List<File>> call(
Account account,
File root, {
bool isSupportedFileOnly = true,
}) async {
/// Dirs with a .nomedia/.noimage file will be ignored
Future<List<File>> call(Account account, File root) async {
final skipDirs = <File>[];
final files = await _c.appDb.use((db) async {
final transaction = db.transaction(AppDb.file2StoreName, idbModeReadOnly);