From fb33be70b5ee83a86d5d6fb81502bfb21d65bd3d Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Sat, 26 Dec 2020 00:16:54 +0100 Subject: [PATCH] Fix displaying issue with active spinner --- ts/graphs/GraphsPage.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ts/graphs/GraphsPage.svelte b/ts/graphs/GraphsPage.svelte index 653b98bc3..5ff471b72 100644 --- a/ts/graphs/GraphsPage.svelte +++ b/ts/graphs/GraphsPage.svelte @@ -17,10 +17,12 @@ export let days: number; export let withRangeBox: boolean; + let active = false; let sourceData: pb.BackendProto.GraphsOut | null = null; let revlogRange: RevlogRange; const refreshWith = async (search: string, days: number) => { + active = true; try { sourceData = await getGraphData(search, days); revlogRange = days > 365 || days === 0 @@ -30,14 +32,11 @@ sourceData = null; alert(i18n.tr(i18n.TR.STATISTICS_ERROR_FETCHING)); } + active = false; } - let active = false; - const refresh = (event: CustomEvent) => { - active = true; refreshWith(event.detail.search, event.detail.days) - active = false; } refreshWith(search, days)