-
-
{title}
+ const currentSliderValue = type === SessionSettingType.Slider && (sliderValue || value);
- {description &&
{description}
}
-
+ return (
+
+
+
{title}
-
- {type === SessionSettingType.Toggle && (
-
-
-
- )}
+ {description &&
{description}
}
+
- {type === SessionSettingType.Button && (
-
+ {type === SessionSettingType.Toggle && (
+
+ props.onClick?.()}
+ confirmationDialogParams={props.confirmationDialogParams}
/>
- )}
-
- {type === SessionSettingType.Options && (
- {
- this.props.onClick(selectedRadioValue);
- }}
+
+ )}
+
+ {type === SessionSettingType.Button && (
+ props.onClick?.()}
+ />
+ )}
+
+ {type === SessionSettingType.Options && (
+ {
+ props.onClick(selectedRadioValue);
+ }}
+ />
+ )}
+
+ {type === SessionSettingType.Slider && (
+
+
- )}
- {type === SessionSettingType.Slider && (
-
-
{
- this.handleSlider(sliderValue);
- }}
- />
-
-
-
{content.info(currentSliderValue)}
-
+
+
{content.info(currentSliderValue)}
- )}
-
+
+ )}
- );
- }
-
- private handleClick() {
- if (this.props.onClick) {
- this.props.onClick();
- }
- }
-
- private handleSlider(value: any) {
- if (this.props.onSliderChange) {
- this.props.onSliderChange(value);
- }
-
- this.setState({
- sliderValue: value,
- });
- }
-}
+
+ );
+};
diff --git a/ts/components/session/settings/SessionSettings.tsx b/ts/components/session/settings/SessionSettings.tsx
index d03453754..2c86f3e8a 100644
--- a/ts/components/session/settings/SessionSettings.tsx
+++ b/ts/components/session/settings/SessionSettings.tsx
@@ -9,7 +9,11 @@ import { StateType } from '../../../state/reducer';
import { getConversationController } from '../../../session/conversations';
import { getConversationLookup } from '../../../state/selectors/conversations';
import { connect, useSelector } from 'react-redux';
-import { getPasswordHash } from '../../../../ts/data/data';
+import {
+ createOrUpdateItem,
+ getPasswordHash,
+ hasLinkPreviewPopupBeenDisplayed,
+} from '../../../../ts/data/data';
import { SpacerLG, SpacerXS } from '../../basic/Text';
import { shell } from 'electron';
import { SessionConfirmDialogProps } from '../SessionConfirm';
@@ -40,7 +44,6 @@ export interface SettingsViewProps {
// pass the conversation as props, so our render is called everytime they change.
// we have to do this to make the list refresh on unblock()
conversations?: ConversationLookupType;
- updateConfirmModal?: any;
}
interface State {
@@ -156,7 +159,6 @@ class SettingsViewInner extends React.Component
{
onSliderChange={sliderFn}
content={content}
confirmationDialogParams={setting.confirmationDialogParams}
- updateConfirmModal={this.props.updateConfirmModal}
/>
)}
@@ -341,7 +343,13 @@ class SettingsViewInner extends React.Component