From 1a83f2635f9615afe1cdab23bb143e7fbe354cfc Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 18 Apr 2022 00:44:08 +0200 Subject: [PATCH] fix: Switch to stream on applications logs --- src/routes/applications/[id]/logs/index.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/applications/[id]/logs/index.svelte b/src/routes/applications/[id]/logs/index.svelte index 505bfbb8d..41d0058a5 100644 --- a/src/routes/applications/[id]/logs/index.svelte +++ b/src/routes/applications/[id]/logs/index.svelte @@ -92,14 +92,15 @@ logs = allLogs.slice(currentPage * 100 - 100, currentPage * 100); } async function loadNewerLogs() { + currentPage -= 1; if (currentPage !== 1) { clearInterval(loadLogsInterval); endOfLogs = false; loadLogsInterval = null; - currentPage -= 1; logs = allLogs.slice(currentPage * 100 - 100, currentPage * 100); } else { startOfLogs = true; + loadLogs(); loadLogsInterval = setInterval(() => { loadLogs(); }, 1000);