Moved asset load callbacks to take into account database insertion time
This commit is contained in:
parent
435752e7a9
commit
28b9886b06
@ -370,8 +370,9 @@ function NetworkedMapAndTokens({ session }) {
|
||||
|
||||
if (id === "mapResponse") {
|
||||
const newMap = data;
|
||||
await putMap(newMap);
|
||||
setCurrentMap(newMap);
|
||||
await putMap(newMap);
|
||||
assetLoadFinish();
|
||||
}
|
||||
|
||||
if (id === "tokenRequest") {
|
||||
@ -382,6 +383,7 @@ function NetworkedMapAndTokens({ session }) {
|
||||
if (id === "tokenResponse") {
|
||||
const newToken = data;
|
||||
await putToken(newToken);
|
||||
assetLoadFinish();
|
||||
}
|
||||
}
|
||||
|
||||
@ -389,9 +391,6 @@ function NetworkedMapAndTokens({ session }) {
|
||||
if (count === 1) {
|
||||
assetLoadStart();
|
||||
}
|
||||
if (total === count) {
|
||||
assetLoadFinish();
|
||||
}
|
||||
assetProgressUpdate({ id, total, count });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user