From c54fe344ce1c08773cdee64a9dfc3797ac2ec1b6 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 21 Jun 2022 18:43:16 +0530 Subject: [PATCH] avoid fetching hidden memories for memories (duh) --- lib/db/files_db.dart | 7 ++++--- lib/ui/memories_widget.dart | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/db/files_db.dart b/lib/db/files_db.dart index c37552c01..52e8d311a 100644 --- a/lib/db/files_db.dart +++ b/lib/db/files_db.dart @@ -580,10 +580,10 @@ class FilesDB { Future> getFilesCreatedWithinDurations( List> durations, - Set ignoredCollectionIDs, + Set ignoredCollectionIDs, ) async { final db = await instance.database; - String whereClause = ""; + String whereClause = "( "; for (int index = 0; index < durations.length; index++) { whereClause += "($columnCreationTime > " + durations[index][0].toString() + @@ -594,13 +594,14 @@ class FilesDB { whereClause += " OR "; } } + whereClause += ") AND $columnMMdVisibility = $kVisibilityVisible"; final results = await db.query( table, where: whereClause, orderBy: '$columnCreationTime ASC', ); final files = _convertToFiles(results); - return _deduplicatedAndFilterIgnoredFiles(files, ignoredCollectionIDs) + return _deduplicatedAndFilterIgnoredFiles(files, ignoredCollectionIDs); } Future> getFilesToBeUploadedWithinFolders( diff --git a/lib/ui/memories_widget.dart b/lib/ui/memories_widget.dart index e63fc7f92..34d225dd9 100644 --- a/lib/ui/memories_widget.dart +++ b/lib/ui/memories_widget.dart @@ -334,8 +334,8 @@ class _FullScreenMemoryState extends State { child: IconButton( icon: Icon( Icons.adaptive.share, - color: Colors.white, - ), //same for both themes + color: Colors.white, //same for both themes + ), onPressed: () { share(context, [file]); },