[FIX] Prevent multiple tap on send (Share Extension) (#1481)

This commit is contained in:
Djorkaeff Alexandre 2019-12-18 16:31:41 -03:00 committed by Diego Mello
parent 7307148b3a
commit 3f02552785
1 changed files with 5 additions and 2 deletions

View File

@ -86,9 +86,12 @@ class ShareView extends React.Component {
bytesToSize = bytes => `${ (bytes / 1048576).toFixed(2) }MB`;
_sendMessage = async() => {
const { isMedia } = this.state;
this.setState({ loading: true });
const { isMedia, loading } = this.state;
if (loading) {
return;
}
this.setState({ loading: true });
if (isMedia) {
await this.sendMediaMessage();
} else {