Skip to content

Commit d9c6ad3

Browse files
committed
make loading of known event ids sync
1 parent adbeef6 commit d9c6ad3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ndk-mobile/src/cache-adapter/sqlite.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,15 @@ export class NDKCacheAdapterSqlite implements NDKCacheAdapter {
117117
});
118118
}
119119

120-
// console.log(`[${Date.now()}] [SQLITE] Cache adapter ready`);
121120
this.ready = true;
122121
this.locking = true;
123122

124123
// load all the event timestamps
125-
const events = await this.db.getAllAsync(`SELECT id, created_at FROM events`) as {id: string, created_at: number}[];
124+
const events = this.db.getAllSync(`SELECT id, created_at FROM events`) as {id: string, created_at: number}[];
126125
for (const event of events) {
127126
this.knownEventTimestamps.set(event.id, event.created_at);
128127
}
129-
128+
130129
await this.loadUnpublishedEvents();
131130

132131
Promise.all(this.pendingCallbacks.map((f) => {

0 commit comments

Comments
 (0)