feat: instant tag suggestions, persistent disk cache, history limit settings, match highlighting and category badges (v2.0.9)

This commit is contained in:
2026-09-03 21:56:52 +03:00
parent 4acd6c29e0
commit 5560332b66
21 changed files with 960 additions and 73 deletions
+24
View File
@@ -22,6 +22,30 @@ class TagSuggestion {
final String providerId;
String get categoryLabel => category.name;
Map<String, dynamic> toJson() => {
'name': name,
'category': category.name,
'postCount': postCount,
'providerId': providerId,
};
factory TagSuggestion.fromJson(Map<String, dynamic> json) => TagSuggestion(
name: (json['name'] ?? '').toString(),
category: tagCategoryFromString((json['category'] ?? '').toString()),
postCount: (json['postCount'] as num?)?.toInt() ?? 0,
providerId: (json['providerId'] ?? '').toString(),
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is TagSuggestion &&
runtimeType == other.runtimeType &&
name.toLowerCase() == other.name.toLowerCase();
@override
int get hashCode => name.toLowerCase().hashCode;
}
TagCategory tagCategoryFromString(String? value) {