diff --git a/common/space_index.ts b/common/space_index.ts index 3ffc8698..199e4c1c 100644 --- a/common/space_index.ts +++ b/common/space_index.ts @@ -20,8 +20,6 @@ export async function ensureSpaceIndex(ds: DataStore, system: System) { console.info("Full space index complete."); await markFullSpaceIndexComplete(ds); indexOngoing = false; - } else { - console.info("Space index is up to date"); } } diff --git a/web/client.ts b/web/client.ts index b1efd88e..438b3037 100644 --- a/web/client.ts +++ b/web/client.ts @@ -255,7 +255,7 @@ export class Client { this.syncService.start(); // We're still booting, if a initial sync has already been completed we know this is the initial sync - const initialSync = !await this.syncService.hasInitialSyncCompleted(); + let initialSync = !await this.syncService.hasInitialSyncCompleted(); this.eventHook.addLocalListener("sync:success", async (operations) => { // console.log("Operations", operations); @@ -275,7 +275,7 @@ export class Client { ensureSpaceIndex(this.stateDataStore, this.clientSystem.system).catch( console.error, ); - } else { + } else { // initialSync // Let's load space scripts, which probably weren't loaded before await this.clientSystem.loadSpaceScripts(); console.log( @@ -284,6 +284,7 @@ export class Client { ensureSpaceIndex(this.stateDataStore, this.clientSystem.system).catch( console.error, ); + initialSync = false; } } if (operations) {