feat: subtext under pr title
This commit is contained in:
@@ -43,9 +43,9 @@ impl Screen {
|
||||
|
||||
_ = cx
|
||||
.subscribe(&self.issue_list, |this, _, event, cx| match event {
|
||||
issue_list::Event::ItemSelected(pr_id) => {
|
||||
this.handle_issue_list_item_selected(pr_id, cx);
|
||||
}
|
||||
| issue_list::Event::ItemSelected(pr_id) => {
|
||||
this.handle_issue_list_item_selected(pr_id, cx);
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
@@ -56,17 +56,18 @@ impl Screen {
|
||||
cx: &mut gpui::Context<Self>,
|
||||
) {
|
||||
match value {
|
||||
SidebarItemValue::PullRequest { filter } => {
|
||||
self.issue_filter = Some(*filter);
|
||||
cx.notify();
|
||||
}
|
||||
| SidebarItemValue::PullRequest { filter } => {
|
||||
self.issue_filter = Some(*filter);
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_issue_list_item_selected(
|
||||
&mut self,
|
||||
id: &api::issues::Id,
|
||||
cx: &mut gpui::Context<Self>, ) {
|
||||
cx: &mut gpui::Context<Self>,
|
||||
) {
|
||||
println!("handle issue list item selected: {:?}", id);
|
||||
self.pull_request_view.update(cx, |view, cx| {
|
||||
view.change_displayed_pull_request(id.clone(), cx);
|
||||
@@ -111,7 +112,6 @@ impl gpui::Render for Screen {
|
||||
.bg(theme.colors.surface)
|
||||
.border_x_1()
|
||||
.border_color(theme.colors.border)
|
||||
.mr_2()
|
||||
.overflow_hidden()
|
||||
.child(self.issue_list.clone()),
|
||||
)
|
||||
@@ -123,8 +123,6 @@ impl gpui::Render for Screen {
|
||||
.h_full()
|
||||
.overflow_hidden()
|
||||
.bg(theme.colors.surface)
|
||||
.border_l_1()
|
||||
.border_color(theme.colors.border)
|
||||
.child(self.pull_request_view.clone()),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user