switched stuff in the state.rs
This commit is contained in:
@@ -5,15 +5,16 @@ use common::proto::multieko2::table_definition::ProfileTreeResponse;
|
||||
|
||||
pub struct UiState {
|
||||
pub show_sidebar: bool,
|
||||
pub profile_tree: ProfileTreeResponse,
|
||||
pub is_saved: bool,
|
||||
// pub show_intro: bool,
|
||||
}
|
||||
|
||||
pub struct AppState {
|
||||
// Core editor state
|
||||
pub is_saved: bool,
|
||||
pub current_dir: String,
|
||||
pub total_count: u64,
|
||||
pub current_position: u64,
|
||||
pub profile_tree: ProfileTreeResponse,
|
||||
|
||||
// UI preferences
|
||||
pub ui: UiState,
|
||||
@@ -25,10 +26,10 @@ impl AppState {
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
Ok(AppState {
|
||||
is_saved: false,
|
||||
current_dir,
|
||||
total_count: 0,
|
||||
current_position: 0,
|
||||
profile_tree: ProfileTreeResponse::default(),
|
||||
ui: UiState::default(),
|
||||
})
|
||||
}
|
||||
@@ -47,7 +48,7 @@ impl Default for UiState {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
show_sidebar: true,
|
||||
profile_tree: ProfileTreeResponse::default(),
|
||||
is_saved: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user