Ensure that only non deleted files are fetched from the DB

This commit is contained in:
Vishnu Mohandas 2020-11-01 12:14:50 +05:30
parent 0376bcbe07
commit 568947fbf6

View file

@ -432,7 +432,7 @@ class FilesDB {
final db = await instance.database;
final rows = await db.query(
table,
where: '$columnCollectionID =?',
where: '$columnCollectionID = ? AND $columnIsDeleted = 0',
whereArgs: [collectionID],
orderBy: '$columnCreationTime DESC',
limit: 1,
@ -448,7 +448,7 @@ class FilesDB {
final db = await instance.database;
final rows = await db.query(
table,
where: '$columnCollectionID =?',
where: '$columnCollectionID = ? AND $columnIsDeleted = 0',
whereArgs: [collectionID],
orderBy: '$columnUpdationTime DESC',
limit: 1,