Fix Docspell search pagination

This commit is contained in:
Jan Bader
2026-07-13 23:02:24 +02:00
parent 952d3d8532
commit 2e0f0939b3
2 changed files with 61 additions and 1 deletions
+2 -1
View File
@@ -122,9 +122,10 @@ func (c *DocspellClient) SearchItems(ctx context.Context, query string, limit in
all = append(all, group.Items...)
count += len(group.Items)
}
if count == 0 || count < limit {
if count == 0 {
return all, nil
}
offset += count - limit
}
}