From 04ffe65c4cf6a58ac589b81d6312245eb59505ff Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 26 Mar 2025 21:31:48 +0100 Subject: [PATCH 1/3] Return early when caching sound --- .python-version | 1 + src/libs/Sound/index.ts | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 000000000000..9ac380418854 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11.5 diff --git a/src/libs/Sound/index.ts b/src/libs/Sound/index.ts index 6f55644dfbcd..edd7200c014c 100644 --- a/src/libs/Sound/index.ts +++ b/src/libs/Sound/index.ts @@ -1,5 +1,7 @@ import {Howl} from 'howler'; import type {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; +import getPlatform from '@libs/getPlatform'; import Log from '@libs/Log'; import {getIsMuted, SOUNDS, withMinimalExecutionTime} from './BaseSound'; import config from './config'; @@ -10,6 +12,11 @@ function cacheSoundAssets() { return; } + // If this is Desktop app, Cache API wont work with app scheme + if (getPlatform() === CONST.PLATFORM.DESKTOP) { + return; + } + caches.open('sound-assets').then((cache) => { const soundFiles = Object.values(SOUNDS).map((sound) => `${config.prefix}${sound}.mp3`); From b2f0de956405ec64778afc8e1b3f42c0e074a218 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 26 Mar 2025 21:36:25 +0100 Subject: [PATCH 2/3] Remoev unnecessary file --- .python-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .python-version diff --git a/.python-version b/.python-version deleted file mode 100644 index 9ac380418854..000000000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.11.5 From 1545c2e3bdb0fb792e956dad10837d2d0a94fb77 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 26 Mar 2025 21:49:22 +0100 Subject: [PATCH 3/3] Prettier --- src/libs/Sound/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Sound/index.ts b/src/libs/Sound/index.ts index edd7200c014c..35b13b58f90d 100644 --- a/src/libs/Sound/index.ts +++ b/src/libs/Sound/index.ts @@ -1,8 +1,8 @@ import {Howl} from 'howler'; import type {ValueOf} from 'type-fest'; -import CONST from '@src/CONST'; import getPlatform from '@libs/getPlatform'; import Log from '@libs/Log'; +import CONST from '@src/CONST'; import {getIsMuted, SOUNDS, withMinimalExecutionTime} from './BaseSound'; import config from './config';