Merge pull request #4459 from urbit/la/fix-434

interface: ensure that we display the correct ship name and do not retain stale state
This commit is contained in:
matildepark 2021-02-19 14:22:26 -05:00 committed by GitHub
commit ddeb7eec94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -114,7 +114,6 @@ export function ChatResource(props: ChatResourceProps) {
} else { } else {
setShowBanner(false); setShowBanner(false);
} }
} else { } else {
const groupShared = await props.api.contacts.fetchIsAllowed( const groupShared = await props.api.contacts.fetchIsAllowed(
`~${window.ship}`, `~${window.ship}`,
@ -127,7 +126,7 @@ export function ChatResource(props: ChatResourceProps) {
setHasLoadedAllowed(true); setHasLoadedAllowed(true);
})(); })();
}, [groupPath]); }, [groupPath, group]);
if(!graph) { if(!graph) {
return <Loading />; return <Loading />;

View File

@ -270,7 +270,7 @@ export const MessageWithSigil = (props) => {
}; };
const timer = setTimeout(() => resetDisplay(), 800); const timer = setTimeout(() => resetDisplay(), 800);
return () => clearTimeout(timer); return () => clearTimeout(timer);
}, [displayName]); }, [shipName, displayName]);
const img = contact?.avatar && !hideAvatars ? ( const img = contact?.avatar && !hideAvatars ? (
<BaseImage <BaseImage