Avoid flicker when toggling project browser on workspace open
This commit is contained in:
parent
9730213ed7
commit
3def7a6803
3 changed files with 57 additions and 40 deletions
|
@ -566,6 +566,18 @@ impl AsyncAppContext {
|
|||
self.update(|cx| cx.add_view(window_id, build_view))
|
||||
}
|
||||
|
||||
pub fn add_window<T, F>(
|
||||
&mut self,
|
||||
window_options: WindowOptions,
|
||||
build_root_view: F,
|
||||
) -> (usize, ViewHandle<T>)
|
||||
where
|
||||
T: View,
|
||||
F: FnOnce(&mut ViewContext<T>) -> T,
|
||||
{
|
||||
self.update(|cx| cx.add_window(window_options, build_root_view))
|
||||
}
|
||||
|
||||
pub fn platform(&self) -> Arc<dyn Platform> {
|
||||
self.0.borrow().platform()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue