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:
Piotr Osiewicz 2024-01-02 13:37:04 +01:00
parent d185fca80c
commit e81072ac0f

View File

@ -86,8 +86,13 @@ impl ToolbarItemView for Breadcrumbs {
cx,
Box::new(move |event, cx| {
if let ItemEvent::UpdateBreadcrumbs = event {
this.update(cx, |_, cx| {
this.update(cx, |this, cx| {
cx.notify();
if let Some(active_item) = this.active_item.as_ref() {
cx.emit(ToolbarItemEvent::ChangeLocation(
active_item.breadcrumb_location(cx),
))
}
})
.ok();
}