Add release channel information to telemetry events

This commit is contained in:
Joseph T Lyons
2022-10-27 15:53:14 -04:00
parent eaebec88c0
commit 93e1e30323
6 changed files with 27 additions and 13 deletions
+3 -3
View File
@@ -86,6 +86,9 @@ fn main() {
});
app.run(move |cx| {
cx.set_global(*RELEASE_CHANNEL);
cx.set_global(HomeDir(zed::paths::HOME.to_path_buf()));
let client = client::Client::new(http.clone(), cx);
let mut languages = LanguageRegistry::new(login_shell_env_loaded);
languages.set_language_server_download_dir(zed::paths::LANGUAGES_DIR.clone());
@@ -97,9 +100,6 @@ fn main() {
let (settings_file_content, keymap_file) = cx.background().block(config_files).unwrap();
cx.set_global(*RELEASE_CHANNEL);
cx.set_global(HomeDir(zed::paths::HOME.to_path_buf()));
//Setup settings global before binding actions
cx.set_global(SettingsFile::new(
&*zed::paths::SETTINGS,
+1 -5
View File
@@ -389,11 +389,7 @@ fn quit(_: &Quit, cx: &mut gpui::MutableAppContext) {
}
fn about(_: &mut Workspace, _: &About, cx: &mut gpui::ViewContext<Workspace>) {
let app_name = match *cx.global::<ReleaseChannel>() {
ReleaseChannel::Dev => "Zed Dev",
ReleaseChannel::Preview => "Zed Preview",
ReleaseChannel::Stable => "Zed",
};
let app_name = cx.global::<ReleaseChannel>().name();
let version = env!("CARGO_PKG_VERSION");
cx.prompt(
gpui::PromptLevel::Info,