moves logic to PlayerView, adds simple notifications when debugging

This commit is contained in:
2019-07-31 15:37:35 +02:00
parent e07b236313
commit dae7633c11
5 changed files with 35 additions and 12 deletions

View File

@@ -130,7 +130,7 @@ export const AppStorage = {
// Put a claim on an item from group chest.
putRequest (itemId) {
const playerId = this.state.player_id
Api.putClaim(playerId, itemId)
return Api.putClaim(playerId, itemId)
.then(done => {
// Update cliend-side state
this.state.player_claims[playerId].push(itemId);
@@ -139,7 +139,7 @@ export const AppStorage = {
// Withdraws a claim.
cancelRequest(itemId) {
const playerId = this.state.player_id
Api.unClaim(playerId, itemId)
return Api.unClaim(playerId, itemId)
.then(done => {
var idx = this.state.player_claims[playerId].indexOf(itemId);
if (idx > -1) {