From 4f4533b4bba4be34b8a8a88991ec828a23e51339 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Fri, 25 Sep 2020 20:57:48 +0100 Subject: [PATCH] Update UI before API, to speed it up. --- src/showplanner/Player.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/showplanner/Player.tsx b/src/showplanner/Player.tsx index b256eb6..e2e4c97 100644 --- a/src/showplanner/Player.tsx +++ b/src/showplanner/Player.tsx @@ -66,8 +66,8 @@ const setTrackIntro = ( player: number ): AppThunk => async (dispatch) => { try { - await api.setTrackIntro(track.trackid, secs); dispatch(MixerState.setLoadedItemIntro(player, secs)); + await api.setTrackIntro(track.trackid, secs); dispatch(ShowPlanState.setItemTimings({ item: track, intro: secs })); } catch (e) { console.error(e); @@ -80,8 +80,8 @@ const setTrackOutro = ( player: number ): AppThunk => async (dispatch) => { try { - await api.setTrackOutro(track.trackid, secs); dispatch(MixerState.setLoadedItemOutro(player, secs)); + await api.setTrackOutro(track.trackid, secs); dispatch(ShowPlanState.setItemTimings({ item: track, outro: secs })); } catch (e) { console.error(e); @@ -94,8 +94,8 @@ const setTrackCue = ( player: number ): AppThunk => async (dispatch) => { try { - await api.setTimeslotItemCue(item.timeslotitemid, secs); dispatch(MixerState.setLoadedItemCue(player, secs)); + await api.setTimeslotItemCue(item.timeslotitemid, secs); dispatch(ShowPlanState.setItemTimings({ item, cue: secs })); } catch (e) { console.error(e);