From a42b34455925e0e31072c6baf5d467b70b563a0a Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 6 Jan 2022 13:55:22 -0600 Subject: [PATCH] DmResource: reload DM if cleared by kick --- pkg/interface/src/views/apps/chat/DmResource.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/DmResource.tsx b/pkg/interface/src/views/apps/chat/DmResource.tsx index d5b47b428e..4c56d32fd5 100644 --- a/pkg/interface/src/views/apps/chat/DmResource.tsx +++ b/pkg/interface/src/views/apps/chat/DmResource.tsx @@ -77,8 +77,10 @@ export function DmResource(props: DmResourceProps) { ); useEffect(() => { - getNewest(`~${window.ship}`, 'dm-inbox', 100, `/${patp2dec(ship)}`); - }, [ship]); + if(!dm) { + getNewest(`~${window.ship}`, 'dm-inbox', 100, `/${patp2dec(ship)}`); + } + }, [ship, dm]); const fetchMessages = useCallback( async (newer: boolean) => {