mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-24 18:38:48 +01:00
Fix exception when counting with empty file list
This commit is contained in:
parent
98696b9a47
commit
82cdd8b6a1
1 changed files with 3 additions and 0 deletions
|
@ -516,6 +516,9 @@ extension SqliteDbExtension on SqliteDb {
|
||||||
required List<int> fileIds,
|
required List<int> fileIds,
|
||||||
}) async {
|
}) async {
|
||||||
assert((sqlAccount != null) != (appAccount != null));
|
assert((sqlAccount != null) != (appAccount != null));
|
||||||
|
if (fileIds.isEmpty) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
final counts = await fileIds.withPartition((sublist) async {
|
final counts = await fileIds.withPartition((sublist) async {
|
||||||
final count = countAll(
|
final count = countAll(
|
||||||
filter:
|
filter:
|
||||||
|
|
Loading…
Reference in a new issue