prepend()でキューが5つ以下の時はexecuteQueueを呼んでしまう

This commit is contained in:
tamaina 2023-07-17 10:40:55 +00:00
parent 02054528f9
commit 0f64372abb

View file

@ -515,12 +515,18 @@ const prepend = (item: MisskeyEntity): void => {
if ( if (
!isPausingUpdate.value && // /調 !isPausingUpdate.value && // /調
queueSize.value === 0 && //
active.value && // keepAlive active.value && // keepAlive
!backed // !backed //
) { ) {
if (items.value.has(item.id)) return; // if (items.value.has(item.id)) return; //
unshiftItems([item]); if (queueSize.value === 0) return unshiftItems([item]);
if (queueSize.value <= 5) {
// 5executeQueue
prependQueue(item);
executeQueue();
return;
}
prependQueue(item);
} else { } else {
prependQueue(item); prependQueue(item);
} }