Skip to content

Commit 4e01bd5

Browse files
committed
fix(sounds): observe live environments immediately
1 parent 99508f5 commit 4e01bd5

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎apps/mobile/src/features/interaction-sounds/InteractionSoundCoordinator.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ export function InteractionSoundCoordinator() {
5050
key={scopedThreadKey(threadRef)}
5151
threadRef={threadRef}
5252
environmentLive={liveEnvironmentIds.has(threadRef.environmentId)}
53-
environmentPreviouslyLive={previouslyLiveEnvironmentIdsRef.current.has(
54-
threadRef.environmentId,
55-
)}
53+
environmentPreviouslyLive={
54+
liveEnvironmentIds.has(threadRef.environmentId) ||
55+
previouslyLiveEnvironmentIdsRef.current.has(threadRef.environmentId)
56+
}
5657
completionSoundEnabled={completionSoundEnabled}
5758
settingsHydrated={settingsHydrated}
5859
players={players}

‎apps/web/src/routes/__root.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,10 @@ function InteractionSoundCoordinator() {
319319
key={scopedThreadKey(threadRef)}
320320
threadRef={threadRef}
321321
environmentLive={liveEnvironmentIds.has(threadRef.environmentId)}
322-
environmentPreviouslyLive={previouslyLiveEnvironmentIdsRef.current.has(
323-
threadRef.environmentId,
324-
)}
322+
environmentPreviouslyLive={
323+
liveEnvironmentIds.has(threadRef.environmentId) ||
324+
previouslyLiveEnvironmentIdsRef.current.has(threadRef.environmentId)
325+
}
325326
completionSoundEnabled={completionSoundEnabled}
326327
settingsHydrated={settingsHydrated}
327328
/>

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"start:marketing": "vp run --filter @t3tools/marketing preview",
1717
"start:mock-update-server": "node scripts/mock-update-server.ts",
1818
"screenshots:mobile": "node scripts/mobile-showcase.ts",
19+
"sounds:generate": "node scripts/generate-interaction-sound-assets.mjs",
1920
"icons:export": "node scripts/export-brand-icons.ts",
2021
"icons:check": "node scripts/export-brand-icons.ts --check",
2122
"build": "vp run --filter './apps/*' build",

0 commit comments

Comments
 (0)