fix: race condition on frq when newly logged in
This commit is contained in:
parent
671c45085d
commit
389f8dcaff
1 changed files with 8 additions and 5 deletions
|
@ -30,7 +30,6 @@
|
||||||
const VERSION = APP_VERSION;
|
const VERSION = APP_VERSION;
|
||||||
const COMMIT = APP_COMMIT;
|
const COMMIT = APP_COMMIT;
|
||||||
const lang = Lang();
|
const lang = Lang();
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
function gotoProfile() {
|
function gotoProfile() {
|
||||||
|
@ -63,9 +62,13 @@
|
||||||
goto("/");
|
goto("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
// fetch follow requests
|
||||||
await fetchFollowRequests(true)
|
let frqsFetched = false;
|
||||||
})
|
|
||||||
|
$: if($account && !frqsFetched) {
|
||||||
|
fetchFollowRequests(true);
|
||||||
|
frqsFetched = true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
|
@ -98,7 +101,7 @@
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</Button>
|
</Button>
|
||||||
{#if $followRequests.length > 0}
|
{#if $followRequests && $followRequests.length > 0}
|
||||||
<Button label="{lang.string('navigation.follow_requests')}"
|
<Button label="{lang.string('navigation.follow_requests')}"
|
||||||
href="/follow-requests"}
|
href="/follow-requests"}
|
||||||
active={$page.url.pathname === "/follow-requests"}>
|
active={$page.url.pathname === "/follow-requests"}>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue