mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 21:00:35 +00:00
Fix missing breadcrumbs on first open of project search.
Fixes: Project search does not have breadcrumbs on its first open: after switching to other tab and back, breadcrumbs are shown
This commit is contained in:
parent
d185fca80c
commit
e81072ac0f
1 changed files with 6 additions and 1 deletions
|
@ -86,8 +86,13 @@ impl ToolbarItemView for Breadcrumbs {
|
||||||
cx,
|
cx,
|
||||||
Box::new(move |event, cx| {
|
Box::new(move |event, cx| {
|
||||||
if let ItemEvent::UpdateBreadcrumbs = event {
|
if let ItemEvent::UpdateBreadcrumbs = event {
|
||||||
this.update(cx, |_, cx| {
|
this.update(cx, |this, cx| {
|
||||||
cx.notify();
|
cx.notify();
|
||||||
|
if let Some(active_item) = this.active_item.as_ref() {
|
||||||
|
cx.emit(ToolbarItemEvent::ChangeLocation(
|
||||||
|
active_item.breadcrumb_location(cx),
|
||||||
|
))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue