Move telemetry settings check into telemetry module

This commit is contained in:
Joseph T. Lyons 2024-01-04 01:13:21 -05:00
parent c76fcb3ca5
commit 2972ee8ced
7 changed files with 41 additions and 77 deletions

View file

@ -5,7 +5,7 @@ pub mod room;
use anyhow::{anyhow, Result};
use audio::Audio;
use call_settings::CallSettings;
use client::{proto, Client, TelemetrySettings, TypedEnvelope, User, UserStore, ZED_ALWAYS_ACTIVE};
use client::{proto, Client, TypedEnvelope, User, UserStore, ZED_ALWAYS_ACTIVE};
use collections::HashSet;
use futures::{channel::oneshot, future::Shared, Future, FutureExt};
use gpui::{
@ -480,9 +480,8 @@ pub fn report_call_event_for_room(
cx: &mut AppContext,
) {
let telemetry = client.telemetry();
let telemetry_settings = *TelemetrySettings::get_global(cx);
telemetry.report_call_event(telemetry_settings, operation, Some(room_id), channel_id)
telemetry.report_call_event(operation, Some(room_id), channel_id, cx)
}
pub fn report_call_event_for_channel(
@ -495,13 +494,11 @@ pub fn report_call_event_for_channel(
let telemetry = client.telemetry();
let telemetry_settings = *TelemetrySettings::get_global(cx);
telemetry.report_call_event(
telemetry_settings,
operation,
room.map(|r| r.read(cx).id()),
Some(channel_id),
cx,
)
}