fix: Correctly show editing tooltip

Remove edit icon
closes #2705
This commit is contained in:
Tom Moor 2021-10-29 23:04:23 -07:00
parent 61d56922d5
commit e2c80e5a28
2 changed files with 13 additions and 4 deletions

View File

@ -65,7 +65,6 @@ class AvatarWithPresence extends React.Component<Props> {
: this.handleOpenProfile
}
size={32}
icon={isEditing ? <EditIcon size={16} color="#FFF" /> : undefined}
/>
</AvatarWrapper>
</Tooltip>

View File

@ -65,12 +65,12 @@ function MultiplayerEditor({ ...props }: Props, ref: any) {
});
provider.on("awarenessChange", ({ states }) => {
states.forEach(({ user }) => {
states.forEach(({ user, cursor }) => {
if (user) {
// could know if the user is editing here using `state.cursor` but it
// feels distracting in the UI, once multiplayer is on for everyone we
// can stop diffentiating
presence.touch(documentId, user.id, false);
presence.touch(documentId, user.id, !!cursor);
}
});
});
@ -105,7 +105,17 @@ function MultiplayerEditor({ ...props }: Props, ref: any) {
ui.setMultiplayerStatus(undefined);
};
}, [history, showToast, t, documentId, ui, presence, token, ydoc]);
}, [
history,
showToast,
t,
documentId,
ui,
presence,
token,
ydoc,
currentUser.id,
]);
const user = React.useMemo(() => {
return {