fuzzyworld

north-star / commit

cleanup

0b65bf68447638b8b112e661ac3160e1f8bb9134 · Pavel Safronov · 2026-03-16 01:02:29 -0700 · parents efc31a14c019

cleanup
 src/app.ts             | 11 +++--------
 src/public-settings.ts |  4 ++--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/app.ts b/src/app.ts
index 2ff9dde..9621b78 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -32,23 +32,18 @@ const arrow = document.getElementById('default-arrow');
 const startRoomButton = document.getElementById('start-room-button');
 const resumeRoomButton = document.getElementById('resume-room-button');
 
-document.head.appendChild(Object.assign(document.createElement('link'), { rel: 'icon', href: './compass.png' }));
-
-const FEET_TO_METERS = 0.3048;
-const LOCATION_CHANGE_THRESHOLD_METERS = PUBLIC_SETTINGS.location.changeThresholdFeet * FEET_TO_METERS;
-const FRIEND_RECENTLY_OFFLINE_OVERRIDE_STORAGE_KEY = 'friend-compass-recently-offline-ms';
+const LOCATION_CHANGE_THRESHOLD_METERS = PUBLIC_SETTINGS.location.changeThresholdMeters;
 const FRIEND_RECENTLY_OFFLINE_MS = (() => {
-    const raw = Number(localStorage.getItem(FRIEND_RECENTLY_OFFLINE_OVERRIDE_STORAGE_KEY));
+    const raw = Number(localStorage.getItem('friend-compass-recently-offline-ms'));
     if (Number.isFinite(raw) && raw > PUBLIC_SETTINGS.presence.onlineGraceMs) {
         return raw;
     }
     return PUBLIC_SETTINGS.presence.defaultRecentlyOfflineMs;
 })();
-const HEADING_CORRECTION_STORAGE_KEY = 'friend-compass-heading-correction-deg';
 const LAST_ROOM_HASH_STORAGE_KEY = 'friend-compass-last-room-hash';
 
 let headingCorrectionDeg = (() => {
-    const parsed = Number(localStorage.getItem(HEADING_CORRECTION_STORAGE_KEY));
+    const parsed = Number(localStorage.getItem('friend-compass-heading-correction-deg'));
     return Number.isFinite(parsed) ? parsed : 0;
 })();
 
diff --git a/src/public-settings.ts b/src/public-settings.ts
index 50bf610..296f561 100644
--- a/src/public-settings.ts
+++ b/src/public-settings.ts
@@ -14,8 +14,8 @@ export const PUBLIC_SETTINGS = {
         stationarySyncIntervalMs: 2 * 60 * 1000,
         /** Max write cadence while movement is detected. */
         movingSyncIntervalMs: 10 * 1000,
-        /** Minimum movement distance (feet) treated as meaningful movement. */
-        changeThresholdFeet: 5
+        /** Minimum movement distance (meters) treated as meaningful movement. */
+        changeThresholdMeters: 1
     },
     presence: {
         /** Time window where a friend is treated as online/solid. */