Code cleanup

This commit is contained in:
micialware committed 2026-09-09 15:00:52 +03:00
1 parent 1ad991667b
commit f66bf69ef5
32 files changed
+234 -899

No files matched your search

+16 -17
View File
@@ -11,9 +11,9 @@ use crate::pages::dictionary::DictionaryMessage::*;
use crate::pages::dictionary_quiz::DictionaryQuizState;
use crate::pages::import::ImportState;
use crate::pages::word::WordState;
use crate::{jl_button, push_error};
use crate::push_error_task;
use crate::styling::*;
use crate::{jl_button, push_error};
use chrono::{DateTime, TimeDelta, Utc};
use hashbrown::{HashMap, HashSet};
use iced::alignment::Vertical::Center;
@@ -434,15 +434,13 @@ impl DictionaryState {
if !data.handle.real() {
return button("-")
.on_press(WordAction(data.handle))
.style(
|_x: &Theme, _status: button::Status| Style {
background: None,
text_color: Color::BLACK,
border: Border::default(),
shadow: Shadow::default(),
snap: false,
},
)
.style(|_x: &Theme, _status: button::Status| Style {
background: None,
text_color: Color::BLACK,
border: Border::default(),
shadow: Shadow::default(),
snap: false,
})
.width(15);
}
@@ -512,15 +510,16 @@ impl DictionaryState {
let dict = &self.state.dictionary.write();
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| {
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))
});
self.words_tags.push((handle, tags))
});
let current_tags = self
.tag_map