Import page base
This commit is contained in:
+9
-4
@@ -27,6 +27,7 @@ use reqwest::Error;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Instant;
|
||||
use crate::import::{ImportMessage, ImportState};
|
||||
|
||||
impl Default for ScreenState {
|
||||
fn default() -> Self {
|
||||
@@ -54,6 +55,7 @@ pub enum RootMessage {
|
||||
Sync(SyncMessage),
|
||||
History(HistoryMessage),
|
||||
RepetitionSettings(RepetitionSettingsMessage),
|
||||
Import(ImportMessage),
|
||||
Keyboard(Event),
|
||||
DataLoaded(HashMap<u32, Vec<(NaiveDate, u32)>>),
|
||||
None,
|
||||
@@ -73,7 +75,7 @@ pub enum Page {
|
||||
Sync(SyncState),
|
||||
History(HistoryState),
|
||||
RepetitionSettings(RepetitionSettingsState),
|
||||
|
||||
Import(ImportState),
|
||||
PreviousPage,
|
||||
}
|
||||
|
||||
@@ -190,7 +192,8 @@ impl ScreenState {
|
||||
Word,
|
||||
Sync,
|
||||
History,
|
||||
RepetitionSettings
|
||||
RepetitionSettings,
|
||||
Import
|
||||
);
|
||||
}
|
||||
println!("Update took {:?}", time.elapsed());
|
||||
@@ -213,7 +216,8 @@ impl ScreenState {
|
||||
Word,
|
||||
Sync,
|
||||
History,
|
||||
RepetitionSettings
|
||||
RepetitionSettings,
|
||||
Import
|
||||
)
|
||||
}
|
||||
|
||||
@@ -233,7 +237,8 @@ impl ScreenState {
|
||||
Word,
|
||||
Sync,
|
||||
History,
|
||||
RepetitionSettings
|
||||
RepetitionSettings,
|
||||
Import
|
||||
);
|
||||
|
||||
println!("View took {:?}", time.elapsed());
|
||||
|
||||
Reference in New Issue
Block a user