refactor: 🏗️

This commit is contained in:
codytseng 2025-01-23 15:53:02 +08:00
parent 0f2f82b3ac
commit ee21e19625
6 changed files with 120 additions and 104 deletions

View file

@ -139,7 +139,7 @@ class ClientService extends EventTarget {
const timeline = this.timelines[key]
let cachedEvents: NEvent[] = []
let since: number | undefined
if (timeline && timeline.refs.length) {
if (timeline && timeline.refs.length && needSort) {
cachedEvents = (
await Promise.all(
timeline.refs.slice(0, filter.limit).map(([id]) => this.eventCache.get(id))