Use preferencesPromise, as refreshing is handled over stores

This commit is contained in:
Henrik Giesel 2021-03-22 00:21:40 +01:00
parent 3363c574c9
commit b3851172ba

View file

@ -10,8 +10,6 @@
export let initialSearch: string;
export let initialDays: number;
const preferencesPromise = getPreferences();
const search = writable(initialSearch);
const days = writable(initialDays);
@ -24,11 +22,12 @@
days,
]);
const preferencesPromise = getPreferences();
const {
pending: prefsPending,
loading: prefsLoading,
value: prefsValue,
} = useAsync(() => getPreferences());
} = useAsync(() => preferencesPromise);
$: revlogRange = daysToRevlogRange($days);
</script>