añadido clearAll cuando se hace logout

This commit is contained in:
2026-01-08 12:14:22 -03:00
parent 70c104c026
commit 65fe89ed5a

View File

@@ -19,9 +19,11 @@
if (typeof window !== 'undefined') {
window.addEventListener('followCacheUpdated', ((
event: CustomEvent<{ userId: string; isFollowed: boolean }>
event: CustomEvent<{ userId: string; isFollowed: boolean } | { clearAll: true }>
) => {
if (event.detail.userId === post.authorId) {
if ('clearAll' in event.detail && event.detail.clearAll === true) {
cargarSeguido();
} else if ('userId' in event.detail && event.detail.userId === post.authorId) {
seguido = event.detail.isFollowed;
}
}) as EventListener);