fix: Can't edit title in collaborative mode

This commit is contained in:
Tom Moor 2021-09-16 22:47:58 -07:00
parent d7e9ad4f13
commit 162da9a3ad
1 changed files with 9 additions and 1 deletions

View File

@ -92,11 +92,19 @@ class DocumentScene extends React.Component<Props> {
if (this.props.readOnly || auth.team?.collaborativeEditing) {
this.lastRevision = document.revision;
}
if (this.props.readOnly) {
if (document.title !== this.title) {
this.title = document.title;
}
} else if (prevProps.document.revision !== this.lastRevision) {
}
if (
!this.props.readOnly &&
!auth.team?.collaborativeEditing &&
prevProps.document.revision !== this.lastRevision
) {
if (auth.user && document.updatedBy.id !== auth.user.id) {
this.props.toasts.showToast(
t(`Document updated by {{userName}}`, {