Fix incompatible getFileDescriptors api calls

This commit is contained in:
Ming Ming 2023-12-10 16:27:10 +08:00
parent 15ed907c34
commit 10b263834d
3 changed files with 11 additions and 5 deletions

View file

@ -54,11 +54,11 @@ class SearchSqliteDbDataSource implements SearchDataSource {
try { try {
final args = { final args = {
#account: account.toDb(), #account: account.toDb(),
#includeRelativePaths: account.roots, #includeRelativeRoots: account.roots,
#excludeRelativePaths: [ #excludeRelativeRoots: [
remote_storage_util.remoteStorageDirRelativePath remote_storage_util.remoteStorageDirRelativePath
], ],
#relativePathKeywords: keywords, #relativePathKeywords: keywords.toList(),
#mimes: file_util.supportedFormatMimes, #mimes: file_util.supportedFormatMimes,
}; };
for (final f in criteria.filters) { for (final f in criteria.filters) {
@ -84,8 +84,8 @@ class SearchSqliteDbDataSource implements SearchDataSource {
try { try {
final args = { final args = {
#account: account.toDb(), #account: account.toDb(),
#includeRelativePaths: account.roots, #includeRelativeRoots: account.roots,
#excludeRelativePaths: [ #excludeRelativeRoots: [
remote_storage_util.remoteStorageDirRelativePath remote_storage_util.remoteStorageDirRelativePath
], ],
#location: criteria.input, #location: criteria.input,

View file

@ -275,7 +275,9 @@ abstract class NpDb {
List<int>? fileIds, List<int>? fileIds,
List<String>? includeRelativeRoots, List<String>? includeRelativeRoots,
List<String>? excludeRelativeRoots, List<String>? excludeRelativeRoots,
List<String>? relativePathKeywords,
String? location, String? location,
bool? isFavorite,
List<String>? mimes, List<String>? mimes,
int? limit, int? limit,
}); });

View file

@ -439,7 +439,9 @@ class NpDbSqlite implements NpDb {
List<int>? fileIds, List<int>? fileIds,
List<String>? includeRelativeRoots, List<String>? includeRelativeRoots,
List<String>? excludeRelativeRoots, List<String>? excludeRelativeRoots,
List<String>? relativePathKeywords,
String? location, String? location,
bool? isFavorite,
List<String>? mimes, List<String>? mimes,
int? limit, int? limit,
}) async { }) async {
@ -449,7 +451,9 @@ class NpDbSqlite implements NpDb {
fileIds: fileIds, fileIds: fileIds,
includeRelativeRoots: includeRelativeRoots, includeRelativeRoots: includeRelativeRoots,
excludeRelativeRoots: excludeRelativeRoots, excludeRelativeRoots: excludeRelativeRoots,
relativePathKeywords: relativePathKeywords,
location: location, location: location,
isFavorite: isFavorite,
mimes: mimes, mimes: mimes,
limit: limit, limit: limit,
); );