setTimeout instead of requestAnimationFrame

This commit is contained in:
Martti Malmi
2024-01-09 12:50:20 +02:00
parent 6026ed34a8
commit 2624920c65
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export const addEventToFuzzySearch = ev => {
if (ev.kind !== 0) { if (ev.kind !== 0) {
return; return;
} }
requestAnimationFrame(() => { setTimeout(() => {
const existing = profileTimestamps.get(ev.pubkey); const existing = profileTimestamps.get(ev.pubkey);
if (existing) { if (existing) {
if (existing > ev.created_at) { if (existing > ev.created_at) {
@ -42,7 +42,7 @@ export const addEventToFuzzySearch = ev => {
}; };
export const addCachedMetadataToFuzzySearch = (profile: CachedMetadata) => { export const addCachedMetadataToFuzzySearch = (profile: CachedMetadata) => {
requestAnimationFrame(() => { setTimeout(() => {
const existing = profileTimestamps.get(profile.pubkey); const existing = profileTimestamps.get(profile.pubkey);
if (existing) { if (existing) {
if (existing > profile.created) { if (existing > profile.created) {

View File

@ -51,7 +51,7 @@ export default class SocialGraph {
if (event.kind !== 3) { if (event.kind !== 3) {
return; return;
} }
requestAnimationFrame(() => { setTimeout(() => {
try { try {
const author = ID(event.pubkey); const author = ID(event.pubkey);
const timestamp = event.created_at; const timestamp = event.created_at;