diff --git a/package.json b/package.json index 043d72d30f30..08f5f4031203 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand", "perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure", "typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc", - "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=262 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=261 --cache --cache-location=node_modules/.cache/eslint", "lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh", "lint-watch": "npx eslint-watch --watch --changed", "shellcheck": "./scripts/shellCheck.sh", diff --git a/src/libs/Sound/BaseSound.ts b/src/libs/Sound/BaseSound.ts index 1b1853eb30a6..813c849e79af 100644 --- a/src/libs/Sound/BaseSound.ts +++ b/src/libs/Sound/BaseSound.ts @@ -4,7 +4,10 @@ import ONYXKEYS from '@src/ONYXKEYS'; let isMuted = false; -Onyx.connect({ +// We use `connectWithoutView` here because this is purely for sound utility logic and not connected +// to any UI component. This connection tracks the platform-specific mute state in a module-level +// variable that sound functions check when called, avoiding unnecessary re-renders since. +Onyx.connectWithoutView({ key: ONYXKEYS.NVP_MUTED_PLATFORMS, callback: (val) => { const platform = getPlatform(true);