Partial AppState rewrite
This commit is contained in:
1 parent
29a90d48d9
commit
0c4aec3dc0
13 files changed
+75
-49
No files matched your search
@@ -36,7 +36,7 @@ pub struct RepetitionsState {
|
||||
word_id_index_map: HashMap<Id, usize>,
|
||||
selected_deck_index: Option<usize>,
|
||||
decks: Vec<DeckViewData>,
|
||||
state: Arc<Mutex<AppState>>,
|
||||
state: AppState,
|
||||
}
|
||||
|
||||
impl NavigatedPage<RepetitionsMessage> for RepetitionsState {
|
||||
@@ -257,7 +257,7 @@ impl NavigatedPage<RepetitionsMessage> for RepetitionsState {
|
||||
}
|
||||
|
||||
impl RepetitionsState {
|
||||
pub(crate) fn new(state: Arc<Mutex<AppState>>) -> RepetitionsState {
|
||||
pub(crate) fn new(state: AppState) -> RepetitionsState {
|
||||
let state_ = state.lock();
|
||||
let mut map = HashMap::with_capacity(state_.dictionary.len());
|
||||
|
||||
|
||||
Reference in new issue
Block a user