mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 13:04:34 +00:00
chore: simplify the call
This commit is contained in:
parent
4d8efa9be4
commit
fc47460ae2
1 changed files with 2 additions and 4 deletions
|
@ -31,10 +31,8 @@ let timeoutId: ReturnType<typeof window.setTimeout> | null = null;
|
|||
|
||||
onMounted(() => {
|
||||
if (props.block.note == null) return;
|
||||
timeoutId = window.setTimeout(() => {
|
||||
retryOnThrottled(() => misskeyApi('notes/show', { noteId: props.block.note })).then(result => {
|
||||
note.value = result;
|
||||
});
|
||||
timeoutId = window.setTimeout(async () => {
|
||||
note.value = await retryOnThrottled(() => misskeyApi('notes/show', { noteId: props.block.note }));
|
||||
}, 500 * props.index); // rate limit is 2 reqs per sec
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue