Merge pull request #5525 from urbit/lf/fix-dm-loading

DmResource: reload DM if cleared by kick
This commit is contained in:
Liam Fitzgerald 2022-01-10 11:07:25 -06:00 committed by GitHub
commit 4009f9d350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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