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:
Smit Barmase 2025-05-12 07:46:18 -07:00 committed by GitHub
parent 8db0333b04
commit 1a0eedb787
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,15 +76,15 @@ impl MigrationBanner {
migration_type, migration_type,
migrated, migrated,
} => { } => {
if self.migration_type == Some(*migration_type) { if *migrated {
let location = if *migrated { self.migration_type = Some(*migration_type);
ToolbarItemLocation::Secondary self.show(cx);
} else { } else {
ToolbarItemLocation::Hidden cx.emit(ToolbarItemEvent::ChangeLocation(
ToolbarItemLocation::Hidden,
));
self.reset(cx);
}; };
cx.emit(ToolbarItemEvent::ChangeLocation(location));
cx.notify();
}
} }
} }
} }