refactor: move sort names to state
This commit is contained in:
parent
499ce1a7ec
commit
84b73b0bdc
3 changed files with 70 additions and 14 deletions
|
|
@ -20,6 +20,8 @@ mod mouse_area;
|
|||
pub mod operation;
|
||||
mod spawn_detached;
|
||||
use tab::Location;
|
||||
|
||||
use crate::config::State;
|
||||
pub mod tab;
|
||||
mod thumbnailer;
|
||||
|
||||
|
|
@ -57,6 +59,7 @@ pub fn desktop() -> Result<(), Box<dyn std::error::Error>> {
|
|||
localize::localize();
|
||||
|
||||
let (config_handler, config) = Config::load();
|
||||
let (state_handler, state) = State::load();
|
||||
|
||||
let mut settings = Settings::default();
|
||||
settings = settings.theme(config.app_theme.theme());
|
||||
|
|
@ -72,6 +75,8 @@ pub fn desktop() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let flags = Flags {
|
||||
config_handler,
|
||||
config,
|
||||
state_handler,
|
||||
state,
|
||||
mode: app::Mode::Desktop,
|
||||
locations,
|
||||
};
|
||||
|
|
@ -88,6 +93,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
localize::localize();
|
||||
|
||||
let (config_handler, config) = Config::load();
|
||||
let (state_handler, state) = State::load();
|
||||
|
||||
let mut daemonize = true;
|
||||
let mut locations = Vec::new();
|
||||
|
|
@ -149,6 +155,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let flags = Flags {
|
||||
config_handler,
|
||||
config,
|
||||
state_handler,
|
||||
state,
|
||||
mode: app::Mode::App,
|
||||
locations,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue