Convert telemetry into a model

Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
This commit is contained in:
Joseph T. Lyons 2023-11-21 21:11:17 -05:00
parent a4a1e6ba98
commit 6e4268a471
9 changed files with 208 additions and 199 deletions

View file

@ -176,15 +176,15 @@ fn main() {
// })
// .detach();
client.telemetry().start(installation_id, session_id, cx);
let telemetry_settings = *client::TelemetrySettings::get_global(cx);
let event_operation = match existing_installation_id_found {
Some(false) => "first open",
_ => "open",
};
client
.telemetry()
.report_app_event(telemetry_settings, event_operation);
client.telemetry().update(cx, |this, cx| {
this.start(installation_id, session_id, cx);
let telemetry_settings = *client::TelemetrySettings::get_global(cx);
let event_operation = match existing_installation_id_found {
Some(false) => "first open",
_ => "open",
};
this.report_app_event(telemetry_settings, event_operation, cx);
});
let app_state = Arc::new(AppState {
languages,