Update API to fetch seen files
This commit is contained in:
parent
c05498b0d3
commit
410e5d522f
1 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ class MemoriesDB {
|
|||
conflictAlgorithm: ConflictAlgorithm.replace);
|
||||
}
|
||||
|
||||
Future<List<int>> getSeenFileIDs() async {
|
||||
Future<Set<int>> getSeenFileIDs() async {
|
||||
final db = await instance.database;
|
||||
return _convertToFileIDs(await db.query(table));
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ class MemoriesDB {
|
|||
return row;
|
||||
}
|
||||
|
||||
List<int> _convertToFileIDs(List<Map<String, dynamic>> rows) {
|
||||
final fileIDs = List<int>();
|
||||
Set<int> _convertToFileIDs(List<Map<String, dynamic>> rows) {
|
||||
final fileIDs = Set<int>();
|
||||
for (final row in rows) {
|
||||
fileIDs.add(int.parse(row[columnFileId]));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue