More migration code
This commit is contained in:
+10
-15
@@ -27,11 +27,9 @@ use std::sync::{Arc, Mutex};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RepetitionsState {
|
||||
correct_filters: Vec<bool>,
|
||||
current_sets_cards_cache: HashMap<usize, (Vec<usize>, Vec<usize>)>,
|
||||
word_id_index_map: HashMap<u32, usize>,
|
||||
local_settings: HashMap<u32, DeckLocalSetting>,
|
||||
view_data: Option<SetViewData>,
|
||||
view_data: Option<DeckViewData>,
|
||||
decks: Vec<DeckSettings>,
|
||||
state: Arc<Mutex<AppState>>,
|
||||
}
|
||||
|
||||
@@ -489,20 +487,17 @@ pub enum RepetitionsMessage {
|
||||
AppendWords(usize),
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
struct DeckLocalSetting {
|
||||
#[derive(Clone)]
|
||||
struct DeckViewData {
|
||||
set_settings: DeckSettings,
|
||||
existing_words_indices: Option<Vec<usize>>,
|
||||
available_words_indices: Option<Vec<usize>>,
|
||||
append_mode: AppendMode,
|
||||
append_warning: bool,
|
||||
valid_filter: bool,
|
||||
index: usize,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct SetViewData{
|
||||
set_local_settings: DeckLocalSetting,
|
||||
set_settings: DeckSettings,
|
||||
existing_words_indices: Vec<usize>,
|
||||
available_words_indices: Vec<usize>,
|
||||
}
|
||||
impl Deref for SetViewData {
|
||||
impl Deref for DeckViewData {
|
||||
type Target = DeckSettings;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
|
||||
Reference in New Issue
Block a user