Skip to content

Commit

Permalink
fix(multiplayer): prevent unnecessary alerts when there is a connecti…
Browse files Browse the repository at this point in the history
…on issue
  • Loading branch information
jeremyckahn committed Apr 30, 2024
1 parent 4ed955b commit b0e037e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Farmhand/Farmhand.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,11 @@ export default class Farmhand extends FarmhandReducers {
inventory
)

const { valueAdjustments } = await postData(endpoints.postDayResults, {
positions,
room,
})

if (Object.keys(positions).length) {
serverMessages.push({
message: POSITIONS_POSTED_NOTIFICATION`${'You'}${positions}`,
Expand All @@ -1062,11 +1067,6 @@ export default class Farmhand extends FarmhandReducers {
broadcastedPositionMessage = POSITIONS_POSTED_NOTIFICATION`${''}${positions}`
}

const { valueAdjustments } = await postData(endpoints.postDayResults, {
positions,
room,
})

nextDayState.valueAdjustments = applyPriceEvents(
valueAdjustments,
nextDayState.priceCrashes,
Expand Down

0 comments on commit b0e037e

Please sign in to comment.