Compatibility check; notification icon fixes

* Display a warning if paired glasses do not have a compatible custo firmware
 * Fix certain notification icons being missing on system card
 * Rescale large notification icons with proper sampling; don't send unnecessary
This commit is contained in:
James Babcock committed 2026-07-04 14:27:25 -07:00
1 parent c9fe92dc1c
commit 3532b1f437
13 files changed
+383 -18

No files matched your search

+6 -1
View File
@@ -1,5 +1,6 @@
import { GrayImage } from "../../graphics/image";
import { spanCurrent } from "../../native/frame-timings";
import { noteStaleDataUsed, renderPassAllowsStaleData } from "../../util/render-freshness";
import { BATTERY_ICON_WIDTH, drawBattery } from "../../graphics/battery";
import { readActiveNotificationIcons } from "../../native/notification-icons";
import { readPhoneBatteryState } from "../../native/phone-battery";
@@ -32,7 +33,11 @@ function drawSystemCardFlowItems(image: GrayImage, bounds: DashboardPluginCardBo
const items: SystemCardFlowItem[] = [];
if (showAndroidNotificationsSetting.get()) {
const maxNotificationIcons = Math.max(0, ((right - left) / Math.max(1, NOTIFICATION_ICON_SIZE + SYSTEM_CARD_ITEM_GAP)) | 0) * 2;
for (const icon of readActiveNotificationIcons(maxNotificationIcons)) {
const { icons, stale } = readActiveNotificationIcons(maxNotificationIcons, renderPassAllowsStaleData());
if (stale) {
noteStaleDataUsed();
}
for (const icon of icons) {
items.push({ type: "notification", icon });
}
}