refactor: consolidate shared ui helpers and prune unused code
This commit is contained in:
@@ -11,6 +11,7 @@ use ui::input::{Input, InputState};
|
||||
use ui::layout::panel::Panel;
|
||||
use ui::theme::ActiveTheme as _;
|
||||
|
||||
use crate::shared::log_dropped;
|
||||
use crate::shared::progress::error_row;
|
||||
use crate::workspace::Workspace;
|
||||
|
||||
@@ -83,7 +84,7 @@ impl SendPatchView {
|
||||
Ok(()) => {
|
||||
this.update(cx, |this, cx| {
|
||||
let panel_id = this.panel_id.clone();
|
||||
crate::shared::log_dropped(
|
||||
log_dropped(
|
||||
this.workspace
|
||||
.update(cx, |workspace, cx| workspace.close_detail(&panel_id, cx)),
|
||||
);
|
||||
@@ -122,7 +123,7 @@ impl SendPatchView {
|
||||
.loading(self.submitting)
|
||||
.disabled(!can_submit)
|
||||
.on_click(move |_, _, cx| {
|
||||
crate::shared::log_dropped(weak.update(cx, |this, cx| this.submit(cx)));
|
||||
log_dropped(weak.update(cx, |this, cx| this.submit(cx)));
|
||||
}),
|
||||
)
|
||||
.into_any_element()
|
||||
|
||||
Reference in New Issue
Block a user