From 8a75b46f51f069f1ab6031a8f4f44e4937ee28d2 Mon Sep 17 00:00:00 2001 From: Rawrington Date: Wed, 10 Jul 2019 12:14:17 +0100 Subject: [PATCH] band-aid fixes for the pull request and hopefully a strange ongoing issue --- package.json | 2 +- src/Action.js | 10 +--------- src/App.js | 8 +++++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 1120aed..ebfe617 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skilldisplay", - "version": "0.1.1", + "version": "0.2.0", "private": true, "dependencies": { "react": "^16.8.6", diff --git a/src/Action.js b/src/Action.js index 2889628..1ead230 100644 --- a/src/Action.js +++ b/src/Action.js @@ -45,21 +45,13 @@ export default function Action({ action_id }) { } }, [action_id]) - const isGCD = React.useMemo( - () => - gcdOverrides.has(action_id) || - !ogcdOverrides.has(action_id) || - apiData !== undefined && apiData.ActionCategory.ID !== 4, - [action_id] - ) - if (apiData === undefined || !apiData.Icon) { return null } return ( {apiData.Name diff --git a/src/App.js b/src/App.js index 33d53cb..7278e2d 100644 --- a/src/App.js +++ b/src/App.js @@ -8,7 +8,8 @@ class App extends React.Component { me: 0, actionlist: [], actionindex: 1, - lastAddedTimestamp: '' + lastAddedTimestamp: '', + lastAddedAction: -1, } constructor(props) { @@ -35,16 +36,17 @@ class App extends React.Component { if(action <= 8) return //things we don't care about i.e. sprint auto-attacks - if(this.state.lastAddedTimestamp === log[1]) return //no double aoe stuff + if(this.state.lastAddedTimestamp === log[1] && this.state.lastAddedAction === action) return //no double aoe stuff const index = this.state.actionindex this.setState((state) => { const actionindex = (state.actionindex >= 32)?1:state.actionindex+1 const lastAddedTimestamp = log[1] + const lastAddedAction = action const actionlist = state.actionlist.concat({index,action}); - return {actionindex,lastAddedTimestamp,actionlist} + return {actionindex,lastAddedTimestamp,lastAddedAction,actionlist} }) setTimeout(this.purgeAction.bind(this), 10000)