From 10b263834dbe02de331f0f28008ed575a6e8322f Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Sun, 10 Dec 2023 16:27:10 +0800 Subject: [PATCH] Fix incompatible getFileDescriptors api calls --- app/lib/entity/search/data_source.dart | 10 +++++----- np_db/lib/src/api.dart | 2 ++ np_db_sqlite/lib/src/sqlite_api.dart | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/lib/entity/search/data_source.dart b/app/lib/entity/search/data_source.dart index af64942a..d807bfa8 100644 --- a/app/lib/entity/search/data_source.dart +++ b/app/lib/entity/search/data_source.dart @@ -54,11 +54,11 @@ class SearchSqliteDbDataSource implements SearchDataSource { try { final args = { #account: account.toDb(), - #includeRelativePaths: account.roots, - #excludeRelativePaths: [ + #includeRelativeRoots: account.roots, + #excludeRelativeRoots: [ remote_storage_util.remoteStorageDirRelativePath ], - #relativePathKeywords: keywords, + #relativePathKeywords: keywords.toList(), #mimes: file_util.supportedFormatMimes, }; for (final f in criteria.filters) { @@ -84,8 +84,8 @@ class SearchSqliteDbDataSource implements SearchDataSource { try { final args = { #account: account.toDb(), - #includeRelativePaths: account.roots, - #excludeRelativePaths: [ + #includeRelativeRoots: account.roots, + #excludeRelativeRoots: [ remote_storage_util.remoteStorageDirRelativePath ], #location: criteria.input, diff --git a/np_db/lib/src/api.dart b/np_db/lib/src/api.dart index f7bcb5dd..1b438642 100644 --- a/np_db/lib/src/api.dart +++ b/np_db/lib/src/api.dart @@ -275,7 +275,9 @@ abstract class NpDb { List? fileIds, List? includeRelativeRoots, List? excludeRelativeRoots, + List? relativePathKeywords, String? location, + bool? isFavorite, List? mimes, int? limit, }); diff --git a/np_db_sqlite/lib/src/sqlite_api.dart b/np_db_sqlite/lib/src/sqlite_api.dart index 6579c275..4b5cde78 100644 --- a/np_db_sqlite/lib/src/sqlite_api.dart +++ b/np_db_sqlite/lib/src/sqlite_api.dart @@ -439,7 +439,9 @@ class NpDbSqlite implements NpDb { List? fileIds, List? includeRelativeRoots, List? excludeRelativeRoots, + List? relativePathKeywords, String? location, + bool? isFavorite, List? mimes, int? limit, }) async { @@ -449,7 +451,9 @@ class NpDbSqlite implements NpDb { fileIds: fileIds, includeRelativeRoots: includeRelativeRoots, excludeRelativeRoots: excludeRelativeRoots, + relativePathKeywords: relativePathKeywords, location: location, + isFavorite: isFavorite, mimes: mimes, limit: limit, );