setTimeout instead of requestAnimationFrame
This commit is contained in:
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user