From 2c719df32e881bc57e55196fee4a426c1c577c95 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 24 May 2018 21:21:45 -0700 Subject: [PATCH] Close share dialog on copy link --- app/components/Modals/Modals.js | 2 +- app/scenes/DocumentShare/DocumentShare.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/Modals/Modals.js b/app/components/Modals/Modals.js index d9a2c23c2..4402415c0 100644 --- a/app/components/Modals/Modals.js +++ b/app/components/Modals/Modals.js @@ -46,7 +46,7 @@ class Modals extends React.Component { - + diff --git a/app/scenes/DocumentShare/DocumentShare.js b/app/scenes/DocumentShare/DocumentShare.js index c5d0901e8..4ddace7df 100644 --- a/app/scenes/DocumentShare/DocumentShare.js +++ b/app/scenes/DocumentShare/DocumentShare.js @@ -10,6 +10,7 @@ import Document from 'models/Document'; type Props = { document: Document, + onCopyLink: () => *, }; @observer @@ -23,7 +24,11 @@ class DocumentShare extends React.Component { handleCopied = () => { this.isCopied = true; - this.timeout = setTimeout(() => (this.isCopied = false), 3000); + + this.timeout = setTimeout(() => { + this.isCopied = false; + this.props.onCopyLink(); + }, 2000); }; render() {