Skip to content

Commit

Permalink
Use logTimestamp as key
Browse files Browse the repository at this point in the history
  • Loading branch information
reyronald committed Apr 7, 2024
1 parent e5c28ea commit 8aa9537
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const handleCodes = new Set([
])

type Action = {
key: number
key: string
actionId: number
ability: string
casting: boolean
Expand All @@ -46,7 +46,6 @@ export default function App() {
let lastAction = -1
let currentZone = "Unknown"

let lastKey = 0
let timeoutId: number | undefined = undefined

const closeFn = listenToACT({
Expand Down Expand Up @@ -153,7 +152,7 @@ export default function App() {
lastTimestamp = logTimestamp
lastAction = actionId

let keyToRemove: number | null = null
let keyToRemove: string | null = null

// This is pretty silly but it's the neatest way to handle the updates going
// out at the same time, without finding some way to merge the action lists....
Expand All @@ -176,8 +175,7 @@ export default function App() {
}
return nextActionList
} else {
const key = (lastKey % 256) + 1
lastKey = key
const key = logTimestamp
return actionList.concat({
actionId,
ability,
Expand Down

0 comments on commit 8aa9537

Please sign in to comment.