diff --git a/packages/app/src/Components/Feed/TimelineFollows.tsx b/packages/app/src/Components/Feed/TimelineFollows.tsx index 8cce0035..4d69f68e 100644 --- a/packages/app/src/Components/Feed/TimelineFollows.tsx +++ b/packages/app/src/Components/Feed/TimelineFollows.tsx @@ -36,7 +36,6 @@ const TimelineFollows = (props: TimelineFollowsProps) => { const [latest, setLatest] = useHistoryState(unixNow(), "TimelineFollowsLatest"); const [limit, setLimit] = useState(50); const feed = useFollowsTimelineView(limit); - console.log("feed", feed); const { muted, isEventMuted } = useModeration(); const oldest = useMemo(() => feed.at(-1)?.created_at, [feed]); diff --git a/packages/system/src/InMemoryDB.ts b/packages/system/src/InMemoryDB.ts index ad87a2fe..74d4352b 100644 --- a/packages/system/src/InMemoryDB.ts +++ b/packages/system/src/InMemoryDB.ts @@ -1,5 +1,6 @@ import { ID, ReqFilter as Filter, STR, TaggedNostrEvent, UID } from "."; import loki from "lokijs"; +import debug from "debug"; type PackedNostrEvent = { id: UID; @@ -38,6 +39,8 @@ class InMemoryDB { setTimeout(() => removeOldest(), 3000); } + #log = debug("InMemoryDB"); + get(id: string): TaggedNostrEvent | undefined { const event = this.eventsCollection.by("id", ID(id)); // throw if db not ready yet? if (event) { @@ -120,9 +123,9 @@ class InMemoryDB { removeOldest(): void { const count = this.eventsCollection.count(); - console.log("InMemoryDB: count", count, this.maxSize); + this.#log("InMemoryDB: count", count, this.maxSize); if (count > this.maxSize) { - console.log("InMemoryDB: removing oldest events", count - this.maxSize); + this.#log("InMemoryDB: removing oldest events", count - this.maxSize); this.eventsCollection .chain() .simplesort("saved_at")