fix: bug of lost followers

This commit is contained in:
codytseng
2025-02-12 22:59:09 +08:00
parent d5f46690c4
commit 5e3fd93a23
4 changed files with 14 additions and 17 deletions

View File

@@ -58,9 +58,8 @@ export function FollowListProvider({ children }: { children: React.ReactNode })
}, [accountPubkey])
const updateFollowListEvent = async (event: Event) => {
const isNew = await indexedDb.putReplaceableEvent(event)
if (!isNew) return
setFollowListEvent(event)
const newEvent = await indexedDb.putReplaceableEvent(event)
setFollowListEvent(newEvent)
}
const follow = async (pubkey: string) => {