diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ea07a8155..a0a02db56 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -316,7 +316,7 @@ SPEC CHECKSUMS: FirebaseInstallations: 0a115432c4e223c5ab20b0dbbe4cbefa793a0e8e FirebaseMessaging: 732623518591384f61c287e3d8f65294beb7ffb3 fk_user_agent: 1f47ec39291e8372b1d692b50084b0d54103c545 - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_email_sender: 02d7443217d8c41483223627972bfdc09f74276b flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433 flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721 diff --git a/lib/db/device_files_db.dart b/lib/db/device_files_db.dart index 98e3a40d3..43ee808c6 100644 --- a/lib/db/device_files_db.dart +++ b/lib/db/device_files_db.dart @@ -387,8 +387,9 @@ extension DeviceFiles on FilesDB { final db = await database; final fileRows = await db.rawQuery( '''SELECT * FROM FILES f JOIN device_files df on f.local_id = df.id - and df.path_id=$pathID order by f.modification_time DESC limit 1; + and df.path_id= ? order by f.modification_time DESC limit 1; ''', + [pathID], ); final files = convertToFiles(fileRows); if (files.isNotEmpty) { diff --git a/lib/services/local/local_sync_util.dart b/lib/services/local/local_sync_util.dart index 662ab9895..76c5997a4 100644 --- a/lib/services/local/local_sync_util.dart +++ b/lib/services/local/local_sync_util.dart @@ -70,12 +70,12 @@ Future>> const OrderOption(type: OrderOptionType.createDate, asc: false), ); for (AssetPathEntity pathEntity in pathEntities) { - //todo: test and handle empty album case final latestEntity = await pathEntity.getAssetListPaged( page: 0, size: 1, ); - final String localCoverID = latestEntity.first.id; + final String localCoverID = + latestEntity.isEmpty ? '' : latestEntity.first.id; result.add(Tuple2(pathEntity, localCoverID)); } return result;