Merge remote-tracking branch 'upstream/clearnet' into add-message-bottom-keep-scroll

pull/1804/head
Audric Ackermann 4 years ago
commit d14807d2ab
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -247,21 +247,23 @@ class SessionCompositionBoxInner extends React.Component<Props, State> {
if (this.isURL(pastedText) && !window.getSettingValue('link-preview-setting', false)) { if (this.isURL(pastedText) && !window.getSettingValue('link-preview-setting', false)) {
const alreadyDisplayedPopup = const alreadyDisplayedPopup =
(await getItemById(hasLinkPreviewPopupBeenDisplayed))?.value || false; (await getItemById(hasLinkPreviewPopupBeenDisplayed))?.value || false;
window.inboxStore?.dispatch( if (!alreadyDisplayedPopup) {
updateConfirmModal({ window.inboxStore?.dispatch(
shouldShowConfirm: updateConfirmModal({
!window.getSettingValue('link-preview-setting') && !alreadyDisplayedPopup, shouldShowConfirm:
title: window.i18n('linkPreviewsTitle'), !window.getSettingValue('link-preview-setting') && !alreadyDisplayedPopup,
message: window.i18n('linkPreviewsConfirmMessage'), title: window.i18n('linkPreviewsTitle'),
okTheme: SessionButtonColor.Danger, message: window.i18n('linkPreviewsConfirmMessage'),
onClickOk: () => { okTheme: SessionButtonColor.Danger,
window.setSettingValue('link-preview-setting', true); onClickOk: () => {
}, window.setSettingValue('link-preview-setting', true);
onClickClose: async () => { },
await createOrUpdateItem({ id: hasLinkPreviewPopupBeenDisplayed, value: true }); onClickClose: async () => {
}, await createOrUpdateItem({ id: hasLinkPreviewPopupBeenDisplayed, value: true });
}) },
); })
);
}
} }
} }

Loading…
Cancel
Save