Fix previewing doc files more than once on Android (#2550)
This commit is contained in:
parent
b24c97b7e9
commit
d40b1da1d0
1 changed files with 7 additions and 1 deletions
|
|
@ -267,12 +267,18 @@ export default class FileAttachmentDocument extends PureComponent {
|
|||
}),
|
||||
}]
|
||||
);
|
||||
this.setStatusBarColor();
|
||||
this.onDonePreviewingFile();
|
||||
RNFetchBlob.fs.unlink(path);
|
||||
}
|
||||
|
||||
this.setState({downloading: false, progress: 0});
|
||||
});
|
||||
|
||||
// Android does not trigger the event for DoneButtonEvent
|
||||
// so we'll wait 4 seconds before enabling the tap for open the preview again
|
||||
if (Platform.OS === 'android') {
|
||||
setTimeout(this.onDonePreviewingFile, 4000);
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue