From 3c4109d3131cae21ede0e4091ffe844bb6fdf359 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 13 Mar 2024 01:58:52 +0100 Subject: [PATCH] UX: let loading sign appear less --- src/UI/Map/StyleLoadingIndicator.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UI/Map/StyleLoadingIndicator.svelte b/src/UI/Map/StyleLoadingIndicator.svelte index 9b3558cbe..2d3dc092c 100644 --- a/src/UI/Map/StyleLoadingIndicator.svelte +++ b/src/UI/Map/StyleLoadingIndicator.svelte @@ -15,8 +15,9 @@ onDestroy(Stores.Chronic(250).addCallback( () => { - isLoading = !map.data?.isStyleLoaded() && (didChange === undefined || didChange) - if(didChange){ + const mapIsLoading = !map.data?.isStyleLoaded() + isLoading = mapIsLoading && didChange + if(didChange && !mapIsLoading){ didChange = false } },