Page MenuHomePhorge

D4048.1765198753.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D4048.1765198753.diff

diff --git a/web/modals/threads/notifications/enum-settings-option.react.js b/web/modals/threads/notifications/enum-settings-option.react.js
--- a/web/modals/threads/notifications/enum-settings-option.react.js
+++ b/web/modals/threads/notifications/enum-settings-option.react.js
@@ -12,20 +12,23 @@
+onSelect: () => void,
+icon: React.Node,
+title: string,
- +description: $ReadOnlyArray<[string, ?boolean]>,
+ +statements: $ReadOnlyArray<{
+ +statement: string,
+ +isStatementValid: ?boolean,
+ }>,
};
function EnumSettingsOption(props: Props): React.Node {
- const { icon, title, description, selected, onSelect } = props;
+ const { icon, title, statements, selected, onSelect } = props;
const descriptionItems = React.useMemo(
() =>
- description.map(([text, isValid]) => (
- <EnumSettingsOptionInfo key={text} valid={isValid}>
- {text}
+ statements.map(({ statement, isStatementValid }) => (
+ <EnumSettingsOptionInfo key={statement} valid={isStatementValid}>
+ {statement}
</EnumSettingsOptionInfo>
)),
- [description],
+ [statements],
);
const optionContainerClasses = React.useMemo(
diff --git a/web/modals/threads/notifications/notifications-modal.react.js b/web/modals/threads/notifications/notifications-modal.react.js
--- a/web/modals/threads/notifications/notifications-modal.react.js
+++ b/web/modals/threads/notifications/notifications-modal.react.js
@@ -63,10 +63,10 @@
const isFocusedSelected = notificationSettings === 'focused';
const focusedItem = React.useMemo(() => {
- const description = [
- ['Banner notifs', true],
- ['Badge count', true],
- ['Lives in Focused tab', true],
+ const statements = [
+ { statement: 'Banner notifs', isStatementValid: true },
+ { statement: 'Badge count', isStatementValid: true },
+ { statement: 'Lives in Focused tab', isStatementValid: true },
];
const icon = (
<SWMansionIcon
@@ -79,7 +79,7 @@
<EnumSettingsOption
selected={isFocusedSelected}
title="Focused (enabled)"
- description={description}
+ statements={statements}
icon={icon}
onSelect={onFocusedSelected}
/>
@@ -88,10 +88,10 @@
const isFocusedBadgeOnlySelected = notificationSettings === 'badge-only';
const focusedBadgeOnlyItem = React.useMemo(() => {
- const description = [
- ['Banner notifs', false],
- ['Badge count', true],
- ['Lives in Focused tab', true],
+ const statements = [
+ { statement: 'Banner notifs', isStatementValid: false },
+ { statement: 'Badge count', isStatementValid: true },
+ { statement: 'Lives in Focused tab', isStatementValid: true },
];
const icon = (
<SWMansionIcon
@@ -104,7 +104,7 @@
<EnumSettingsOption
selected={isFocusedBadgeOnlySelected}
title="Focused (badge only)"
- description={description}
+ statements={statements}
icon={icon}
onSelect={onBadgeOnlySelected}
/>
@@ -113,10 +113,10 @@
const isBackgroundSelected = notificationSettings === 'background';
const backgroundItem = React.useMemo(() => {
- const description = [
- ['Banner notifs', false],
- ['Badge count', false],
- ['Lives in Backgound tab', true],
+ const statements = [
+ { statement: 'Banner notifs', isStatementValid: false },
+ { statement: 'Badge count', isStatementValid: false },
+ { statement: 'Lives in Background tab', isStatementValid: true },
];
const icon = (
<SWMansionIcon
@@ -129,7 +129,7 @@
<EnumSettingsOption
selected={isBackgroundSelected}
title="Background"
- description={description}
+ statements={statements}
icon={icon}
onSelect={onBackgroundSelected}
/>

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 8, 12:59 PM (2 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848368
Default Alt Text
D4048.1765198753.diff (3 KB)

Event Timeline