From 70fb5f5bfd7ecbf79a40cadf99422536e7b9b780 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 20 Mar 2026 12:19:22 +0700 Subject: [PATCH] fix(app): add worklet directives to working indicator functions Functions called inside useAnimatedStyle must be marked as worklets. Missing directives caused a native crash on Android with newer react-native-reanimated/worklets that enforce UI-thread safety. --- packages/app/src/utils/working-indicator.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/app/src/utils/working-indicator.ts b/packages/app/src/utils/working-indicator.ts index 44e5466a0..27c947c59 100644 --- a/packages/app/src/utils/working-indicator.ts +++ b/packages/app/src/utils/working-indicator.ts @@ -6,6 +6,7 @@ export const WORKING_INDICATOR_OFFSETS = [ ] as const; function normalizePhase(value: number): number { + "worklet"; const wrapped = value % 1; return wrapped < 0 ? wrapped + 1 : wrapped; } @@ -14,6 +15,7 @@ export function getWorkingIndicatorDotStrength( progress: number, offset: number ): number { + "worklet"; const phase = normalizePhase(progress + offset); if (phase <= 0.5) { return phase * 2;