DmResource: reload DM if cleared by kick

This commit is contained in:
Liam Fitzgerald 2022-01-06 13:55:22 -06:00
parent fb5151bf4b
commit a42b344559

View File

@ -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) => {