Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

chore(desktop-gpui): drop more comments that restate the code

Richie McIlroyd604f455135b
diff --git a/apps/desktop-gpui/src/camera_window.rs b/apps/desktop-gpui/src/camera_window.rs
index 6472a1783..030261571 100644
--- a/apps/desktop-gpui/src/camera_window.rs
+++ b/apps/desktop-gpui/src/camera_window.rs
@@ -1014,8 +1014,6 @@ struct CameraPreviewView {
/// repaint the whole preview for a message that did not change.
camera_error: Option<String>,
effect_issue: Option<(&'static str, &'static str)>,
- /// Camera access is still being asked for: the prompt is up, so the
- /// preview says so instead of spinning with no end.
awaiting_access: bool,
_feeds_subscription: Subscription,
_access_subscription: Subscription,
diff --git a/apps/desktop-gpui/src/main_window.rs b/apps/desktop-gpui/src/main_window.rs
index a00a30c63..cabac8bdd 100644
--- a/apps/desktop-gpui/src/main_window.rs
+++ b/apps/desktop-gpui/src/main_window.rs
@@ -2587,8 +2587,6 @@ impl MainWindow {
/// Select (or clear) the camera -- the same wiring as the camera panel's
/// rows: this window's state plus the app-scoped feed, which opens or
/// closes the preview bubble.
- /// The pill for a picked device Cap cannot use yet, or `None` when access
- /// is fine.
fn access_pill(&self, permission: OSPermission, cx: &gpui::App) -> Option<PillState> {
let access = MediaAccess::global(cx);
let access = access.read(cx);
@@ -5770,8 +5768,6 @@ impl MainWindow {
)
}
- /// Above a camera/mic list Cap cannot use yet: what is wrong and the one
- /// button that fixes it.
fn render_access_banner(
&self,
menu: DeviceMenu,
diff --git a/apps/desktop-gpui/src/media_access.rs b/apps/desktop-gpui/src/media_access.rs
index 370827f52..7d337e5c1 100644
--- a/apps/desktop-gpui/src/media_access.rs
+++ b/apps/desktop-gpui/src/media_access.rs
@@ -76,7 +76,6 @@ impl MediaAccess {
self.requesting == Some(permission)
}
- /// Re-read both statuses off the main thread.
pub fn refresh(&mut self, cx: &mut Context<Self>) {
if self.refresh.is_some() {
return;
@@ -163,7 +162,6 @@ impl MediaAccess {
}
}
-/// Short action label for a missing permission: what clicking will do.
pub fn action_label(status: OSPermissionStatus) -> &'static str {
match status {
OSPermissionStatus::Denied => "Turn on in Settings",
diff --git a/apps/desktop-gpui/src/onboarding_window/stage.rs b/apps/desktop-gpui/src/onboarding_window/stage.rs
index ce56cd9e6..68396015e 100644
--- a/apps/desktop-gpui/src/onboarding_window/stage.rs
+++ b/apps/desktop-gpui/src/onboarding_window/stage.rs
@@ -97,7 +97,6 @@ pub(super) struct StageState {
/// permission still to do.
focused: Option<OSPermission>,
skipped: Vec<OSPermission>,
- /// The permission whose action was taken and is now waiting on macOS.
pub(super) waiting_on: Option<OSPermission>,
shown: Option<(Stage, bool)>,
shown_at: Instant,
diff --git a/apps/desktop-gpui/src/permissions.rs b/apps/desktop-gpui/src/permissions.rs
index b2e7c1624..7a89abd4d 100644
--- a/apps/desktop-gpui/src/permissions.rs
+++ b/apps/desktop-gpui/src/permissions.rs
@@ -293,8 +293,6 @@ pub async fn ensure_capture_media_permission(permission: OSPermission) -> Result
macos::ensure_capture_media_permission(permission).await
}
-/// Whether a camera or microphone request is still waiting on the user's
-/// answer to the macOS prompt.
pub fn media_request_pending() -> bool {
#[cfg(target_os = "macos")]
return macos::media_request_pending();