Fix asserting when there are favorite files outside roots

This commit is contained in:
Ming Ming 2023-12-07 00:44:22 +08:00
parent 0e4411c725
commit 33462d9fec

View file

@ -250,7 +250,6 @@ extension SqliteDbFileExtension on SqliteDb {
"isArchived: $isArchived"); "isArchived: $isArchived");
final rowIds = await _accountFileRowIdsOf( final rowIds = await _accountFileRowIdsOf(
account, fileIds.map(DbFileKey.byId).toList()); account, fileIds.map(DbFileKey.byId).toList());
assert(rowIds.length == fileIds.length);
final q = update(accountFiles) final q = update(accountFiles)
..where( ..where(
(t) => t.rowId.isIn(rowIds.values.map((e) => e.accountFileRowId))); (t) => t.rowId.isIn(rowIds.values.map((e) => e.accountFileRowId)));