mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Use preferencesPromise, as refreshing is handled over stores
This commit is contained in:
parent
3363c574c9
commit
b3851172ba
1 changed files with 2 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue