chore: simplify the call

This commit is contained in:
Outvi V 2025-06-02 09:23:15 +08:00
parent 4d8efa9be4
commit fc47460ae2

View file

@ -31,10 +31,8 @@ let timeoutId: ReturnType<typeof window.setTimeout> | null = null;
onMounted(() => { onMounted(() => {
if (props.block.note == null) return; if (props.block.note == null) return;
timeoutId = window.setTimeout(() => { timeoutId = window.setTimeout(async () => {
retryOnThrottled(() => misskeyApi('notes/show', { noteId: props.block.note })).then(result => { note.value = await retryOnThrottled(() => misskeyApi('notes/show', { noteId: props.block.note }));
note.value = result;
});
}, 500 * props.index); // rate limit is 2 reqs per sec }, 500 * props.index); // rate limit is 2 reqs per sec
}); });