Partial AppState rewrite
This commit is contained in:
1 parent
29a90d48d9
commit
0c4aec3dc0
13 files changed
+75
-49
No files matched your search
@@ -22,7 +22,7 @@ use std::sync::Arc;
|
||||
use tokio::task::spawn_blocking;
|
||||
|
||||
pub struct RepetitionState {
|
||||
state: Arc<Mutex<AppState>>,
|
||||
state: AppState,
|
||||
pub settings: DeckSettings,
|
||||
pub set: DeckData,
|
||||
current_word: WordData,
|
||||
@@ -104,7 +104,7 @@ impl NavigatedPage<RepetitionMessage> for RepetitionState {
|
||||
impl RepetitionState {
|
||||
pub(crate) fn new(
|
||||
set: DeckSettings,
|
||||
state: Arc<Mutex<AppState>>,
|
||||
state: AppState,
|
||||
) -> Result<RepetitionState, NotificationData> {
|
||||
let mut card_set = DeckData::new(&set, state.clone())?;
|
||||
let (word, stat) = card_set.next();
|
||||
|
||||
Reference in new issue
Block a user