setTimeout instead of requestAnimationFrame
Some checks reported errors
continuous-integration/drone/push Build encountered an error

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) {
return;
}
requestAnimationFrame(() => {
setTimeout(() => {
const existing = profileTimestamps.get(ev.pubkey);
if (existing) {
if (existing > ev.created_at) {
@ -42,7 +42,7 @@ export const addEventToFuzzySearch = ev => {
};
export const addCachedMetadataToFuzzySearch = (profile: CachedMetadata) => {
requestAnimationFrame(() => {
setTimeout(() => {
const existing = profileTimestamps.get(profile.pubkey);
if (existing) {
if (existing > profile.created) {

View File

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