Frontend: Event listener fixes
This commit is contained in:
parent
4ea5d7c106
commit
286c8cfe02
|
@ -69,11 +69,11 @@ function onFolloweeChange(user: Misskey.entities.User) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
globalEvents.on("followeeProcessed", () => onFolloweeChange(props.user));
|
globalEvents.on("followeeProcessed", onFolloweeChange, this);
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
globalEvents.off("followeeProcessed", () => onFolloweeChange(props.user));
|
globalEvents.off("followeeProcessed", onFolloweeChange, this);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,18 @@ const pagination = {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
globalEvents.on("followeeProcessed", () =>
|
globalEvents.on(
|
||||||
paginationComponent.value.reload()
|
"followeeProcessed",
|
||||||
|
paginationComponent.value.reload,
|
||||||
|
this
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
globalEvents.off("followeeProcessed", () =>
|
globalEvents.off(
|
||||||
paginationComponent.value.reload()
|
"followeeProcessed",
|
||||||
|
paginationComponent.value.reload,
|
||||||
|
this
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue