Make ProjectDiff serializable (#25182)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-02-19 12:05:25 -07:00 committed by GitHub
parent 8e17b34eff
commit 836661503f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 58 additions and 26 deletions

View file

@ -2297,7 +2297,7 @@ impl EventEmitter<Event> for GitPanel {}
impl EventEmitter<PanelEvent> for GitPanel {}
pub(crate) struct GitPanelAddon {
pub(crate) git_panel: Entity<GitPanel>,
pub(crate) workspace: WeakEntity<Workspace>,
}
impl editor::Addon for GitPanelAddon {
@ -2312,9 +2312,11 @@ impl editor::Addon for GitPanelAddon {
cx: &App,
) -> Option<AnyElement> {
let file = excerpt_info.buffer.file()?;
let git_panel = self.git_panel.read(cx);
let git_panel = self.workspace.upgrade()?.read(cx).panel::<GitPanel>(cx)?;
git_panel.render_buffer_header_controls(&self.git_panel, &file, window, cx)
git_panel
.read(cx)
.render_buffer_header_controls(&git_panel, &file, window, cx)
}
}