Add journal crate and move supporting logic into workspace crate
I needed to interact with the workspace to open a file from the journal crate, so I moved a bunch of logic out of main related to opening new workspaces and paths.
This commit is contained in:
parent
cd65031cda
commit
ca0d7e5e1f
12 changed files with 299 additions and 222 deletions
|
@ -11,7 +11,7 @@ use parking_lot::Mutex;
|
|||
use postage::watch;
|
||||
use std::{cmp, sync::Arc};
|
||||
use theme::ThemeRegistry;
|
||||
use workspace::{Settings, Workspace};
|
||||
use workspace::{Settings, Workspace, AppState};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ThemeSelectorParams {
|
||||
|
@ -317,3 +317,13 @@ impl View for ThemeSelector {
|
|||
cx
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a AppState> for ThemeSelectorParams {
|
||||
fn from(state: &'a AppState) -> Self {
|
||||
Self {
|
||||
settings_tx: state.settings_tx.clone(),
|
||||
settings: state.settings.clone(),
|
||||
themes: state.themes.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue