Fixing tag selection

This commit is contained in:
micialware committed 2026-09-09 12:12:44 +03:00
1 parent a20c72eb9d
commit 7715aaff3b
5 files changed
+39 -626

No files matched your search

+8 -4
View File
@@ -507,15 +507,19 @@ impl DictionaryState {
}
fn update_tags(&mut self) {
self.words_tags.clear();
let mut tags_list: HashSet<String> = HashSet::new();
let dict = &self.state.dictionary.write();
dict.iter().for_each(|element| {
split_with_coma(element.tags.as_str())
.iter()
let mut words_query = dict.full_query();
let handles = words_query.handles().collect::<Vec<_>>();
words_query.iter(dict).zip(handles).for_each(|(element, handle)| {
let tags = split_with_coma(element.tags.as_str());
tags.iter()
.for_each(|tag| {
tags_list.insert(tag.clone());
});
self.words_tags.push((handle, tags))
});
let current_tags = self