do not show warning about link preview if they are already ON

This commit is contained in:
audric 2021-07-23 15:21:51 +10:00
parent e69873d6ba
commit e82d51fff0

View file

@ -239,7 +239,7 @@ class SessionCompositionBoxInner extends React.Component<Props, State> {
*/
private async showLinkSharingConfirmationModalDialog(e: any) {
const pastedText = e.clipboardData.getData('text');
if (this.isURL(pastedText)) {
if (this.isURL(pastedText) && !window.getSettingValue('link-preview-setting', false)) {
const alreadyDisplayedPopup =
(await getItemById(hasLinkPreviewPopupBeenDisplayed))?.value || false;
window.inboxStore?.dispatch(