fix: resolve No post yet by adapting postMatchesRequestedTags to tag groups and filtering 'and' from provider queries

This commit is contained in:
2026-09-03 21:15:01 +03:00
parent a8b778146d
commit fb31a303ff
3 changed files with 30 additions and 15 deletions
+2 -1
View File
@@ -43,11 +43,12 @@ void main() {
expect(postPassesTagFilters(post, settings), isFalse);
});
test('requested search tags are all required', () {
test('requested search tags are all required unless separated by and', () {
final post = _post(tags: ['touhou', 'hakurei_reimu']);
expect(postMatchesRequestedTags(post, ['touhou']), isTrue);
expect(postMatchesRequestedTags(post, ['touhou', 'cirno']), isFalse);
expect(postMatchesRequestedTags(post, ['touhou', 'and', 'cirno']), isTrue);
});
test('requested search tags can match tag prefixes', () {