install_cli: Show feedback when installing CLI from welcome screen (#28532)
Closes #28408 Release Notes: - Fixed no feedback provided when installing CLI from welcome page.
This commit is contained in:
parent
46b1df2e2d
commit
0921762b59
5 changed files with 71 additions and 57 deletions
|
@ -12,6 +12,7 @@ use language::language_settings::{EditPredictionProvider, all_language_settings}
|
|||
use settings::{Settings, SettingsStore};
|
||||
use std::sync::Arc;
|
||||
use ui::{CheckboxWithLabel, ElevationIndex, Tooltip, prelude::*};
|
||||
use util::ResultExt;
|
||||
use vim_mode_setting::VimModeSetting;
|
||||
use workspace::{
|
||||
AppState, Welcome, Workspace, WorkspaceId,
|
||||
|
@ -219,13 +220,11 @@ impl Render for WelcomePage {
|
|||
.icon_size(IconSize::XSmall)
|
||||
.icon_color(Color::Muted)
|
||||
.icon_position(IconPosition::Start)
|
||||
.on_click(cx.listener(|_, _, _, cx| {
|
||||
.on_click(cx.listener(|this, _, window, cx| {
|
||||
telemetry::event!("Welcome CLI Installed");
|
||||
cx
|
||||
.spawn(async move |_, cx| {
|
||||
install_cli::install_cli(&cx).await
|
||||
})
|
||||
.detach_and_log_err(cx);
|
||||
this.workspace.update(cx, |_, cx|{
|
||||
install_cli::install_cli(window, cx);
|
||||
}).log_err();
|
||||
})),
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue