Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix migrate banner not showing markdown on file changes (#30575)

Smit Barmase1a0eedb7878e
diff --git a/crates/zed/src/zed/migrate.rs b/crates/zed/src/zed/migrate.rs
index 118b71c89f3..0adee2bf4ad 100644
--- a/crates/zed/src/zed/migrate.rs
+++ b/crates/zed/src/zed/migrate.rs
@@ -76,15 +76,15 @@ impl MigrationBanner {
migration_type,
migrated,
} => {
- if self.migration_type == Some(*migration_type) {
- let location = if *migrated {
- ToolbarItemLocation::Secondary
- } else {
- ToolbarItemLocation::Hidden
- };
- cx.emit(ToolbarItemEvent::ChangeLocation(location));
- cx.notify();
- }
+ if *migrated {
+ self.migration_type = Some(*migration_type);
+ self.show(cx);
+ } else {
+ cx.emit(ToolbarItemEvent::ChangeLocation(
+ ToolbarItemLocation::Hidden,
+ ));
+ self.reset(cx);
+ };
}
}
}