mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-23 09:33:01 +03:00
init project in add_project handler
This commit is contained in:
parent
cb93ce5ce1
commit
9958730c2f
@ -286,6 +286,12 @@ fn add_project(handle: tauri::AppHandle, path: &str) -> Result<projects::Project
|
||||
let project = projects::Project::from_path(path.to_string())?;
|
||||
app_state.projects_storage.add_project(&project)?;
|
||||
|
||||
repositories::Repository::open(
|
||||
&app_state.projects_storage,
|
||||
&app_state.users_storage,
|
||||
&project.id,
|
||||
)?;
|
||||
|
||||
let (tx, rx): (mpsc::Sender<events::Event>, mpsc::Receiver<events::Event>) = mpsc::channel();
|
||||
app_state.watchers.lock().unwrap().watch(tx, &project)?;
|
||||
watch_events(handle, rx);
|
||||
|
Loading…
Reference in New Issue
Block a user