Jelajahi Sumber

rename and fix bug in query

Neeraj Gupta 3 tahun lalu
induk
melakukan
a7d8fca551
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 2 2
      lib/db/files_db.dart
  2. 1 1
      lib/services/remote_sync_service.dart

+ 2 - 2
lib/db/files_db.dart

@@ -579,13 +579,13 @@ class FilesDB {
   }
 
   // Files which user added to a collection manually but they are not uploaded yet.
-  Future<List<File>> getFilesUserUploadedManually() async {
+  Future<List<File>> getPendingManualUploads() async {
     final db = await instance.database;
     final results = await db.query(
       table,
       where:
           '($columnUploadedFileID IS NULL OR $columnUploadedFileID IS -1) AND '
-          '$columnCollectionID IS NOT NULL AND $columnCollectionID IS NOT -1 AND'
+          '$columnCollectionID IS NOT NULL AND $columnCollectionID IS NOT -1 AND '
           '$columnLocalID IS NOT NULL AND $columnLocalID IS NOT -1',
       orderBy: '$columnCreationTime DESC',
       groupBy: columnLocalID,

+ 1 - 1
lib/services/remote_sync_service.dart

@@ -215,7 +215,7 @@ class RemoteSyncService {
     if (filesToBeUploaded.isEmpty) {
       // look for files which user manually tried to back up but they are not
       // uploaded yet. These files should ignore video backup & ignored files filter
-      filesToBeUploaded = await _db.getFilesUserUploadedManually();
+      filesToBeUploaded = await _db.getPendingManualUploads();
     }
     _moveVideosToEnd(filesToBeUploaded);
     _logger.info(