better sync for "Gm Monitor" between gm
This commit is contained in:
@@ -176,8 +176,7 @@ export class GmMonitor extends FormApplication {
|
||||
|
||||
this.object.actors.push(actor[0]);
|
||||
|
||||
await this._saveActorsIds();
|
||||
return this.refresh();
|
||||
return this._saveAndRefresh();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -193,6 +192,16 @@ export class GmMonitor extends FormApplication {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save ids and refresh the windows (local and socket)
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
async _saveAndRefresh() {
|
||||
await this._saveActorsIds();
|
||||
game.l5r5e.sockets.refreshAppId("l5r5e-gm-monitor");
|
||||
return this.refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the Sheet for this actor
|
||||
* @param {Event} event
|
||||
@@ -228,8 +237,7 @@ export class GmMonitor extends FormApplication {
|
||||
|
||||
this.object.actors = this.object.actors.filter((e) => e.id !== id);
|
||||
|
||||
await this._saveActorsIds();
|
||||
return this.refresh();
|
||||
return this._saveAndRefresh();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user