avoid fetching hidden memories for memories (duh)

This commit is contained in:
Neeraj Gupta 2022-06-21 18:43:16 +05:30
parent 03ea93f277
commit c54fe344ce
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
2 changed files with 6 additions and 5 deletions

View file

@ -580,10 +580,10 @@ class FilesDB {
Future<List<File>> getFilesCreatedWithinDurations( Future<List<File>> getFilesCreatedWithinDurations(
List<List<int>> durations, List<List<int>> durations,
Set<int> ignoredCollectionIDs, Set<int> ignoredCollectionIDs,
) async { ) async {
final db = await instance.database; final db = await instance.database;
String whereClause = ""; String whereClause = "( ";
for (int index = 0; index < durations.length; index++) { for (int index = 0; index < durations.length; index++) {
whereClause += "($columnCreationTime > " + whereClause += "($columnCreationTime > " +
durations[index][0].toString() + durations[index][0].toString() +
@ -594,13 +594,14 @@ class FilesDB {
whereClause += " OR "; whereClause += " OR ";
} }
} }
whereClause += ") AND $columnMMdVisibility = $kVisibilityVisible";
final results = await db.query( final results = await db.query(
table, table,
where: whereClause, where: whereClause,
orderBy: '$columnCreationTime ASC', orderBy: '$columnCreationTime ASC',
); );
final files = _convertToFiles(results); final files = _convertToFiles(results);
return _deduplicatedAndFilterIgnoredFiles(files, ignoredCollectionIDs) return _deduplicatedAndFilterIgnoredFiles(files, ignoredCollectionIDs);
} }
Future<List<File>> getFilesToBeUploadedWithinFolders( Future<List<File>> getFilesToBeUploadedWithinFolders(

View file

@ -334,8 +334,8 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
child: IconButton( child: IconButton(
icon: Icon( icon: Icon(
Icons.adaptive.share, Icons.adaptive.share,
color: Colors.white, color: Colors.white, //same for both themes
), //same for both themes ),
onPressed: () { onPressed: () {
share(context, [file]); share(context, [file]);
}, },