update
This commit is contained in:
@@ -122,7 +122,7 @@ impl IssuesView {
|
||||
let panel = cx.new(|cx| IssueDetailView::new(self.store.clone(), issue_id, window, cx));
|
||||
|
||||
dock_area.update(cx, |dock_area, cx| {
|
||||
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Bottom, None, window, cx);
|
||||
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Center, None, window, cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ impl PullRequestsView {
|
||||
let panel = cx.new(|cx| PullRequestDetailView::new(self.store.clone(), pr_id, window, cx));
|
||||
|
||||
dock_area.update(cx, |dock_area, cx| {
|
||||
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Bottom, None, window, cx);
|
||||
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Center, None, window, cx);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -133,14 +133,16 @@ impl PullRequestsView {
|
||||
/// `pr_ix` the index of the pull request in the store's `pull_requests`.
|
||||
fn render_row(&self, ix: usize, pr_ix: usize, cx: &mut Context<Self>) -> AnyElement {
|
||||
let pr = &self.store.read(cx).pull_requests[pr_ix];
|
||||
let pr_id = pr.id;
|
||||
let title = activity_subject(pr);
|
||||
let id_hex = pr.id.to_hex();
|
||||
|
||||
let age = relative_time(pr.created_at);
|
||||
let status = self.store.read(cx).status_of(pr);
|
||||
|
||||
let profile = ProfileStore::global(cx).read(cx).get(&pr.pubkey);
|
||||
let author = profile.name();
|
||||
let picture = profile.picture();
|
||||
let age = relative_time(pr.created_at);
|
||||
let status = self.store.read(cx).status_of(pr);
|
||||
let pr_id = pr.id;
|
||||
|
||||
h_flex()
|
||||
.id(ix)
|
||||
@@ -402,7 +404,6 @@ impl PullRequestsView {
|
||||
})),
|
||||
),
|
||||
)
|
||||
// Spacer: pushes the button to the right edge.
|
||||
.child(div().flex_1())
|
||||
.child(
|
||||
BaseButton::new("new-pr")
|
||||
|
||||
@@ -54,13 +54,14 @@ impl Workspace {
|
||||
}
|
||||
let dock = dock_for_pruning.clone();
|
||||
cx.spawn_in(window, async move |_, window| {
|
||||
_ = dock.update_in(window, |area, window, cx| {
|
||||
dock.update_in(window, |area, window, cx| {
|
||||
for placement in [DockPlacement::Bottom, DockPlacement::Right] {
|
||||
if area.is_empty(placement, cx) {
|
||||
area.remove_dock(placement, window, cx);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.ok();
|
||||
})
|
||||
.detach();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user