mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
fix: 🐛 Fix infinite refresh of account cache
This commit is contained in:
parent
dc004601b0
commit
e50a6d6f2b
|
|
@ -7,7 +7,9 @@ export const useCacheRefresh = (client: MaybeRef<Client | null>) => {
|
|||
}
|
||||
|
||||
// Refresh custom emojis and instance data and me on every reload
|
||||
watchEffect(async () => {
|
||||
watch(
|
||||
[identity, client],
|
||||
async () => {
|
||||
console.info("Refreshing emoji, instance and account cache");
|
||||
if (identity.value) {
|
||||
toValue(client)
|
||||
|
|
@ -64,5 +66,7 @@ export const useCacheRefresh = (client: MaybeRef<Client | null>) => {
|
|||
identity.value.instance = res.data;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
{ flush: "sync" },
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue