From 095dd478a3af86f29f9972b34388ca8587bb4e49 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 4 May 2024 09:58:11 +0100 Subject: [PATCH 1/2] fix gfx --- bundle-src/src/graphics/rosesFencing/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundle-src/src/graphics/rosesFencing/index.tsx b/bundle-src/src/graphics/rosesFencing/index.tsx index 9f3e57e..783db23 100644 --- a/bundle-src/src/graphics/rosesFencing/index.tsx +++ b/bundle-src/src/graphics/rosesFencing/index.tsx @@ -13,7 +13,9 @@ function bannerMsg(round: number) { export function AllRosesFencingGraphics() { const state = useOnlyReplicantValue("eventState"); - const control = useOnlyReplicantValue("control-fencing"); + const control = useOnlyReplicantValue( + "control-rosesFencing" + ); const now = useTime(); From 68fbadf0b0ef596081df1fbe47ad5d88347f490e Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 4 May 2024 10:01:48 +0100 Subject: [PATCH 2/2] Fix double-touch race conditions --- .../src/common/sports/rosesFencing/index.tsx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/scores-src/src/common/sports/rosesFencing/index.tsx b/scores-src/src/common/sports/rosesFencing/index.tsx index c3bf634..96c5b89 100644 --- a/scores-src/src/common/sports/rosesFencing/index.tsx +++ b/scores-src/src/common/sports/rosesFencing/index.tsx @@ -162,6 +162,21 @@ const slice = createSlice({ return wrapAction({ payload }); }, }, + doubleTap: { + reducer(state) { + state.segmentPoints[state.segmentPoints.length - 1].push({ + side: "home", + player: null, + }); + state.segmentPoints[state.segmentPoints.length - 1].push({ + side: "away", + player: null, + }); + }, + prepare() { + return wrapAction({ payload: {} }); + }, + }, resetState: { reducer(state) { state.segmentPoints = []; @@ -186,6 +201,7 @@ const actionPayloadValidators: ActionPayloadValidators< player: Yup.string().uuid().optional().nullable(), }), resetState: Yup.object({}), + doubleTap: Yup.object({}), }; const actionValidChecks: ActionValidChecks = {}; @@ -218,10 +234,11 @@ const actionRenderers: ActionRenderers< ); }, + doubleTap: () => Double touch, resetState: () => State reset., }; -const hiddenActions = new Set(["addPoints"] as Array< +const hiddenActions = new Set(["addPoints", "doubleTap"] as Array< keyof typeof slice["actions"] >); @@ -268,8 +285,7 @@ const components: EventComponents = {