Fix migrate banner not showing markdown on file changes (#30575)
Fixes case where on file (settings/keymap) changes banner would appear but markdown was not visible. Regression caused by refactor happened in https://github.com/zed-industries/zed/pull/30456. Release Notes: - N/A
This commit is contained in:
parent
8db0333b04
commit
1a0eedb787
1 changed files with 9 additions and 9 deletions
|
@ -76,15 +76,15 @@ impl MigrationBanner {
|
|||
migration_type,
|
||||
migrated,
|
||||
} => {
|
||||
if self.migration_type == Some(*migration_type) {
|
||||
let location = if *migrated {
|
||||
ToolbarItemLocation::Secondary
|
||||
if *migrated {
|
||||
self.migration_type = Some(*migration_type);
|
||||
self.show(cx);
|
||||
} else {
|
||||
ToolbarItemLocation::Hidden
|
||||
cx.emit(ToolbarItemEvent::ChangeLocation(
|
||||
ToolbarItemLocation::Hidden,
|
||||
));
|
||||
self.reset(cx);
|
||||
};
|
||||
cx.emit(ToolbarItemEvent::ChangeLocation(location));
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue