diff --git a/js/mobile/package.json b/js/mobile/package.json index ebe23a4..77912fb 100644 --- a/js/mobile/package.json +++ b/js/mobile/package.json @@ -10,7 +10,8 @@ "android": "expo run:android", "compile": "tsc --noEmit", "lint": "expo lint", - "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"" + "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"", + "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"" }, "packageManager": "yarn@1.22.22", "dependencies": { diff --git a/js/mobile/src/features/stream-view/MediaParticleView.tsx b/js/mobile/src/features/stream-view/MediaParticleView.tsx index 0b043c2..cf19a15 100644 --- a/js/mobile/src/features/stream-view/MediaParticleView.tsx +++ b/js/mobile/src/features/stream-view/MediaParticleView.tsx @@ -112,8 +112,6 @@ function PlayableMediaView({ }); return () => { cancelled = true; - // Reset on teardown so the next object starts from a clean slate while - // its signed URL resolves, rather than flashing the previous video. setSourceUri(null); setResolveError(null); setCurrentTime(0); diff --git a/js/mobile/src/hooks/use-channel.ts b/js/mobile/src/hooks/use-channel.ts index f78bc78..f299a8b 100644 --- a/js/mobile/src/hooks/use-channel.ts +++ b/js/mobile/src/hooks/use-channel.ts @@ -65,7 +65,6 @@ export function useChannel(channelId: string | null): UseChannelResult { client.off(channelId, 'leave', onLeave); client.off(channelId, 'message', onMessage); client.unsubscribe(channelId); - // Clear on teardown so a new channel doesn't briefly show stale data. setPresence([]); setMessages([]); }; diff --git a/js/mobile/src/hooks/use-particle.ts b/js/mobile/src/hooks/use-particle.ts index 0428e7b..27e046a 100644 --- a/js/mobile/src/hooks/use-particle.ts +++ b/js/mobile/src/hooks/use-particle.ts @@ -43,7 +43,6 @@ export function useLiveParticle(path: ParticlePath): UseLiveParticleResult { return () => { unsubscribe(); - // Reset on teardown so a new path doesn't flash the previous particle. setIsLoading(true); setError(null); setParticle(null); @@ -112,7 +111,6 @@ export function useLiveParticleChildren( return () => { unsubscribe(); - // Reset on teardown so a new path doesn't flash the previous children. setChildren([]); setError(null); setIsLoading(true); @@ -157,7 +155,6 @@ export function useLiveLatestChild( return () => { unsubscribe(); - // Reset on teardown so a new path doesn't flash the previous child. setIsLoading(true); setLatestChild(null); };