mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Revert "Differentiate between first time app starts and subsequent ones"
This commit is contained in:
parent
aafc3a9584
commit
d8685baa47
@ -157,16 +157,13 @@ impl Telemetry {
|
||||
self.executor
|
||||
.spawn(
|
||||
async move {
|
||||
let (device_id, is_first_time_start) =
|
||||
if let Ok(Some(device_id)) = db.read_kvp("device_id") {
|
||||
(device_id, false)
|
||||
} else {
|
||||
let device_id = Uuid::new_v4().to_string();
|
||||
db.write_kvp("device_id", &device_id)?;
|
||||
(device_id, true)
|
||||
};
|
||||
|
||||
this.report_start_app(is_first_time_start);
|
||||
let device_id = if let Ok(Some(device_id)) = db.read_kvp("device_id") {
|
||||
device_id
|
||||
} else {
|
||||
let device_id = Uuid::new_v4().to_string();
|
||||
db.write_kvp("device_id", &device_id)?;
|
||||
device_id
|
||||
};
|
||||
|
||||
let device_id: Arc<str> = device_id.into();
|
||||
let mut state = this.state.lock();
|
||||
@ -263,13 +260,6 @@ impl Telemetry {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn report_start_app(self: &Arc<Self>, is_first_time_start: bool) {
|
||||
self.report_event(
|
||||
"start app",
|
||||
json!({ "First Time Open": is_first_time_start }),
|
||||
)
|
||||
}
|
||||
|
||||
fn flush(self: &Arc<Self>) {
|
||||
let mut state = self.state.lock();
|
||||
let mut events = mem::take(&mut state.queue);
|
||||
|
@ -150,6 +150,7 @@ fn main() {
|
||||
let project_store = cx.add_model(|_| ProjectStore::new());
|
||||
let db = cx.background().block(db);
|
||||
client.start_telemetry(db.clone());
|
||||
client.report_event("start app", Default::default());
|
||||
|
||||
let app_state = Arc::new(AppState {
|
||||
languages,
|
||||
|
Loading…
Reference in New Issue
Block a user