Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(utils): allow memory pressure levels only macOS reports

Richie McIlroyd510a098f323
diff --git a/apps/desktop-gpui/assets/icons/history.svg b/apps/desktop-gpui/assets/icons/history.svg
deleted file mode 100644
index ec7e003b7..000000000
--- a/apps/desktop-gpui/assets/icons/history.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2.5 8.333A7.5 7.5 0 1 1 4.05 14.1" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M2.5 4.167v4.166h4.167M10 5.833V10l2.917 1.667" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
diff --git a/apps/desktop-gpui/assets/icons/minimize.svg b/apps/desktop-gpui/assets/icons/minimize.svg
deleted file mode 100644
index 665b9e965..000000000
--- a/apps/desktop-gpui/assets/icons/minimize.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M11.6667 3.33333V8.33333M11.6667 8.33333H16.6667M11.6667 8.33333L16.875 3.125M8.33333 16.6667V11.6667M8.33333 11.6667H3.33333M8.33333 11.6667L3.125 16.875" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
diff --git a/apps/desktop-gpui/assets/icons/traffic-zoom.svg b/apps/desktop-gpui/assets/icons/traffic-zoom.svg
deleted file mode 100644
index 61c6df2bd..000000000
--- a/apps/desktop-gpui/assets/icons/traffic-zoom.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M.75.75H6.5L.75 6.5V.75ZM7.25 7.25H1.5l5.75-5.75v5.75Z" fill="currentColor"/></svg>
diff --git a/crates/utils/src/export_resources.rs b/crates/utils/src/export_resources.rs
index 810b1b506..31168de19 100644
--- a/crates/utils/src/export_resources.rs
+++ b/crates/utils/src/export_resources.rs
@@ -9,6 +9,8 @@ static DISK_SAMPLE_SLOT: tokio::sync::Semaphore = tokio::sync::Semaphore::const_
const CRITICAL_MEMORY_SAMPLES: u8 = 3;
const STOP_PREFIX: &str = "Export stopped to protect your computer: ";
+// Only macOS reports memory pressure; elsewhere every sample is Unknown.
+#[cfg_attr(not(target_os = "macos"), allow(dead_code))]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
enum MemoryPressure {
#[default]