fix: Improved handling of simultaneous edits

This commit is contained in:
Tom Moor
2020-06-02 23:16:15 -07:00
parent 05e24df226
commit 33815639f2
3 changed files with 58 additions and 29 deletions

View File

@ -128,22 +128,6 @@ class SocketProvider extends React.Component<Props> {
});
}
}
// TODO: Move this to the document scene once data loading
// has been refactored to be friendlier there.
if (
auth.user &&
documentId === ui.activeDocumentId &&
document.updatedBy.id !== auth.user.id
) {
ui.showToast(`Document updated by ${document.updatedBy.name}`, {
timeout: 30 * 1000,
action: {
text: 'Refresh',
onClick: () => window.location.reload(),
},
});
}
}
}